Hurry! 20% Off Ends SoonRegister Now

Conditional Formatting in Cognos Report Studio

 

Conditional Formatting

  • Conditional Formatting is a process of formatting the business data based on a given condition.
  • 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!

Conditional formatting – String variables

  • 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

 MindMajix YouTube Channel

CONDITIONAL FORMATTING – STRING VARIABLES

conditional formattingconditional formattingconditional formatting cognosconditional formatting 1conditional formatting 2conditional formatting cognosconditional formatting 4conditional formatting 5conditional formatting 6conditional formatting 7conditional formatting 8conditional formatting 9conditional formatting 10conditional formatting 11conditional formatting 12

Conditional formatting – Boolean 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 itemsconditional formatting for Boolean variableconditional formatting for Booleanconditional formatting for Boolean 1conditional formatting for Boolean 2conditional formatting for Boolean 3conditional formatting for Boolean 4conditional formatting for Boolean 5

Conditional Formatting – Report Language 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

report language variable
report language variable 1report language variable 2
report language variable 3report language variable 4report language variable 5report language variable 6report language variable 7report language variable 8report language variable 9report language variable 10report language variable 11
Explore Cognos Sample Resumes! Download & Edit, Get Noticed by Top Employers!Download Now!

 

Job Support Program

Online Work Support for your on-job roles.

jobservice

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:

  • Pay Per Hour
  • Pay Per Week
  • Monthly
Learn MoreGet Job Support
Course Schedule
NameDates
IBM Cognos TrainingDec 24 to Jan 08View Details
IBM Cognos TrainingDec 28 to Jan 12View Details
IBM Cognos TrainingDec 31 to Jan 15View Details
IBM Cognos TrainingJan 04 to Jan 19View Details
Last updated: 04 Apr 2023
About Author

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.

read less