-
Book Overview & Buying
-
Table Of Contents
IBM Cognos 10 Report Studio Cookbook, Second Edition - Second Edition
The business wants to see company sales figure by years and quarters. They want to highlight the entries where sales are below 5,000,000.
We will assume that database provides us the Quarter number and we need to convert that to words. We will use conditional formatting for that. Also, where sales is below 5 million, the cell will be shown in red using another conditional variable.
Create a simple list report with Year and Quarter (numeric) columns from the Sales / Time query subject.
Drag Quantity from Sales fact.
Group by Year and sort by Quarter.
Conditional formatting is used to enhance the report visualization. Here is how we can define conditional formatting in the created report:
Go to Condition Explorer and click on Variables as shown in the following screenshot:

Drag a new string variable from the Toolbox pane. Define the expression as [Query1].[Quarter (numeric)].
Change the name of the variable to Convert_To_Words as shown in the...
Change the font size
Change margin width
Change background colour