Using Styles and nVision

By Chris Heller • January 6, 2006

So, you’ve created this really cool nVision report that gets all the data you want, but you can’t for the life of you figure out how to get it to format the way you want. You’ve gone through all the documentation, and have reached the point where you’re wondering where you can get a lamb to sacrifice to the gods of nVision. In order to save countless sheep out there, I’ve tried to describe how it works and what you should do.

In the beginning….

Originally, formatting in nVision was pretty straightforward. You would format the cells you wanted, and the formatting of the contents cells were used for any rows or columns inserted through nPlosion. Because the options for nPlosion were limited, there wasn’t much need to deal with it.

Along came tree nPlosion…

Then, we added the ability to nPlode multiple levels in a tree. This was great, because there was less hard-coding needed in reports, but it added an issue of how to format the different levels different ways. We needed to create an infrastructure to support this.

This infrastructure was created to allow formatting to be applied to rows or columns that nVision inserts due to the nPlosion feature (which shows supporting detail dynamically). It pulls together multiple elements in an effort to simplify the effort for applying these formatting rules.

  • It understands the inherent structure of an nVision report, where there are
    • Headings that precede a set of children rows or columns and label them.
    • Labels that are used to describe rows or columns.
    • Numeric amounts.
    • Base formatting for rows or columns inserted, where the cells are not populated by nVision.
  • It understands that results are generated at multiple levels of granularity, and that the different levels need specialized formatting rules.
  • It leverages the formatting functionality delivered in excel, and allows the rules to be applied in combination with each other using Excel styles:
    • Number formatting
    • Indentation and other alignment features
    • Font formatting, including size, name, and emphasis
    • Outline formatting, such as that used to designate a total line.
  • Background color.

In addition, an understanding of the way that nVision inserts rows and applies formatting allows customers additional flexibility in applying formatting, such as conditional formatting (which is not supported in style definitions in excel). Conditional formatting allows the data in the report to control the format (such as highlighting a row of data that falls outside an acceptable threshold).

It’s important to note that nVision styles are not applied to rows or columns that existed in the layout prior to running the report. They are only applied to rows inserted due to nPlosion.

More on nVision Stylesheets

In order to support defining different formatting for rows, columns, different levels of aggregation, and different types of fields in a report, nVision has implicit knowledge of specific style names in excel that have different meanings. In other words, when it comes time to apply styles to an nVision report, it looks for excels styles with specific names and applies them. This means that there are different style names for these different attributes.

Therefore, Excel styles that nVision utilizes has the following naming convention:

First Character:
R (for row), or C (for Column)

Second and Third Characters:
The level number (00 = detail, 01 = first level, 02 = second level)

Fourth and Fifth Characters:
B (for Base), A (for Amount), L (for label), H (for heading)

This means that R01H is the formatting to be applied to the heading row for a row nPloded at the first level of the hierarchy.

In order to simplify the maintenance of these styles, spreadsheets are delivered with the styles populated and displayed. Customers can maintain the styles within these worksheets and then click a button to apply (or copy) the styles to a given nVision layout. After the style names have been copied to the layout, they can be modified directly in the layout without affecting other reports.

Labels: nVision, Tree_Manager

Put the Appsian Security Platform to the Test

Schedule Your Demonstration and see how the Appsian Security Platform can be tailored to your organization’s unique objectives

Start your free demo

"Learn how you can reduce risk with rapid threat protection, audit response and access control. All from a single, comprehensive platform"

Trusted by hundreds of leading brands