Coloring Report Rows with Color Rules

Last Updated: 08/12/2016 Introduced in Verision: 2.0

Color Rules evaluate the data in a row, coloring the row when its data meets the rule’s condition.  When building a color rule, you select a rule that has already been created, and set the color that will highlight the row.  The rule must us a column on the report as an input.

For example, a rule could be created called PNG Rule that evaluates whether a document type is .png.  Then, create a report listing all the folders in the system and all of the documents in those folders.  One of the columns on that report, Document Type, could then be used as input for the PNG Rule.  Then, create a color rule for the report that uses the PNG Rule to evaluate the Document Type against the conditions in the rule, and highlights all of those rows that contain .png in the Document Type field.

To assign a color rule to a report, in the Report Designer, in the Properties Panel, under the section Colors > Row Color Rules, click the Add button.

Example

The goal of this example is to:

  1. Build a report that contains a Nesting Level column.
  2. Use a previously created rule, Color Rule, to evaluate if the data in the Nesting Level column is equal to 2.
  3. Configure the color rule to highlight rows that meet the rule’s criteria in pink on the report.

To begin, navigate to a Designer Folder, click the Create Report button and select Create Report.

   createReport                    

Give the new report a name and click Ok to open it in the Report Designer.

nameReport

 

First, add a data source to the report.

In the Toolbox Panel, under the category Data Sources > Common, drag a Folder Data Source to the Sources list.

dragFolderDataSource

 

Then add columns to the report.

From the Folder Data Source category, drag an Entity Name, Folder Type Name, and Nesting Level into the workspace.

addColumns

 

Then associate the report with the color rule.

In the Properties Panel, under the Colors section, select the Use Row Coloring checkbox.  This will expand the Colors section.  Next, under the section Colors > Row Color Rules, click the Add button.

addColorToEntityName

 

 In the resulting pop-up window, in the Rule drop down list, select the previously created rule that evaluates if Nesting Level data is equal to 2.

This rule was created to use Nesting Level data as an input, so once the rule is selected, Nesting Level appears in the Rule Inputs box.  Now set the field on the report for the rule to evaluation.

Select the Nesting Level input, and click Edit.

editColorRule

 

Select the column value to use as the rule’s input in the Report Field drop down list and click Ok.

editRuleInputs

 

Now that the connection is made between the field on the report and the rule that will evaluate it, the next step is to define the row color for those that meet the rule’s condition (“Nesting Level = 2”).

Click the Background Selector.

clickBackgroundSelector

 

In the resulting Color Picker pop-up window, select the color and click Ok.

pickColor

 

Setting the foreground and selected colors are an option as well, but the color rule is complete.  Click Ok.

saveColorRul

 

The report is also complete.  Save the report and close the Report Designer.

To view the report, select the newly created report’s thumbnail and select Run Report from its Action menu.

 runReport

The report displays rows where the Nesting Level value satisfies the rule colored.  Other rows are not colored.

runningReport 

Additional Resources