Highlight Data Using a Style Variable

Highlight data in your report to better identify exceptional results. For example, you want to identify sales representatives who have exceeded their quota. You create a condition that checks whether each representative's sales for the year is greater than their quota for the year.

Style variables are useful if you are working with reports that were created in a previous version of IBM® Cognos® Business Intelligence or if you want to use language variables to specify conditional styles.

You can also use conditional styles to highlight data. If a report contains both conditional styles and style variables, the style variables are applied before the conditional styles.

Procedure

  1. Create a variable and define the condition that determines if the data will be highlighted.
  2. In the work area, click the column to highlight based on the condition.
  3. In the Properties pane, double-click the Style Variable property.
  4. Click Variable, click the variable to assign to the object, and click OK.
  5. If you assigned a string variable, in the Values box, select the values for the condition to support.
    Tip: A default value exists for the variable, and it is always selected.
  6. If you assigned a language variable, in the Values box, select the languages for the condition to support.
    Tip: A default value exists for the variable, and it is always selected.
  7. Click OK.
  8. Pause the pointer over the condition explorer button condition explorer icon and click a value other than the default value.
    Tip: When you select a value in the condition explorer, the Explorer bar becomes green to indicate that conditional formatting is turned on and that any changes you make to the report apply only to the variable value.

    For example, if you created a Boolean variable, click Yes.

  9. In the Properties pane, specify the formatting with which to highlight the column when the condition is satisfied.

    For example, click the Border property to create a thicker border around the column.

  10. Repeat steps 8 to 9 for other possible values defined for the variable.
    Tip: To view the report with no variables applied, pause the pointer over the condition explorer button and click (No variable) or triple-click the Explorer bar.

Results

When you run the report, the report objects to which you applied the variable are highlighted when the condition is satisfied. For example, if you created a Boolean variable, the objects are highlighted when the condition is met. If the condition is not satisfied for any object, no conditional formatting is applied.