Conditional Formatting
Users can quickly analyze the business data by using conditional formatting
Conditional formatting can be done with the help of variables
There are three types of variables – STRING, BOOLEAN, REPORT LANGUAGE VARIABLES
Variables are used to hold the results of an expression
Learn how to use Cognos, from beginner basics to advanced techniques, with online video tutorials taught by industry experts. Enroll in Free Cognos Training Demo!
Create a list report with the following query items
Order year, Order method, Quantity
Group on order year
Total on quantity
Go to conditional explorer- Click on variables
From the insertable objects, pane drag the string variable and drop it on variable window
Define the following expression in the expression definition window
if ([Query1].[order year]=2004) then (1)
else if ([Query1].[order year]=2005) then (2)
else if([Query1].[order year]=2006) then (3)
Click on validate- click on OK
Add variables 1,2,3 to the values list
Click on add – give values
1
2
3
Click on OK
From page explorer,
Open the report page page1
Select order year data item
From the ancestor, properties click on list columns body style
From conditional explorer,
Select the string variable 1
From the properties pane, select style variable
Click on eclipses { … }
Set the variable as string1
Select the string variable1
Select the font property- click on eclipses
Set the font size and color
From condition explorer
Select the string variable 2
Set the font size and color
From condition explorer,
Select the string variable 3
Set the font size and color
Turn off the explorer bar (By double-clicking) and run the report
CONDITIONAL FORMATTING – STRING VARIABLES
Create a list report with the following items
The product line, Product type, Product name, Margin
From conditional explorer click on variables
From insertable objects
Drag the Boolean variable and drop it on the variable window
Define the following expression in the expression definition window
Drag the margin from available components and drop in the expression window
[Query1].[Margin]>0.3
Validate – à OK
From page explorer – à Select page1
Select any data item in the report
From ancestor select list column body style
From properties pane
Select style variable property
Click on eclipses
From drop-down list box
Select the Boolean1 variable- à Click on OK
From conditional explorer
Select Boolean variable – Yes
From the properties
Set the font property—>Click on eclipses
Set the font size and color
From condition explorer
Select the Boolean variable as No
From the properties pane—>Select font properties
Set the properties—> Turn off the explorer bar
Save & Run the report
[Related Article: Cognos Interview Questions And Answers ]
CONDITIONAL FORMATTING – BOOLEAN VARIABLE
Create a list report with the following query items
Order year, Order method, Quantity, Revenue
Group on order year
Total on quantity and revenue
From conditional explorer bar,
Click on variables
From insertable objects on
Drag the report language variable and drop it on the variables window
Select Chinese language from the list of languages
Click on OK
From page explorer,
Click on Page1
Select any data item
From ancestor
Select list
From properties pane
Select the style variable
Click on eclipses
Select the style variable on report language1
Select Chinese
Click on OK
From conditional explorer
Select the report language variable as Chinese
Select the font property
Set the font size & color
From condition explorer,
Select the report language variable as others
From properties
Select the font
Set the font properties & size
Turn off the explorer bar
Save the report
Set run options – Chinese
Run the report
CONDITIONAL FORMATTING – REPORT LANGUAGE VARIABLE
Our work-support plans provide precise options as per your project tasks. Whether you are a newbie or an experienced professional seeking assistance in completing project tasks, we are here with the following plans to meet your custom needs:
Name | Dates | |
---|---|---|
IBM Cognos Training | Dec 24 to Jan 08 | View Details |
IBM Cognos Training | Dec 28 to Jan 12 | View Details |
IBM Cognos Training | Dec 31 to Jan 15 | View Details |
IBM Cognos Training | Jan 04 to Jan 19 | View Details |
Ravindra Savaram is a Technical Lead at Mindmajix.com. His passion lies in writing articles on the most popular IT platforms including Machine learning, DevOps, Data Science, Artificial Intelligence, RPA, Deep Learning, and so on. You can stay up to date on all these technologies by following him on LinkedIn and Twitter.