Mindmajix

Conditional Formatting in Cognos Report Studio

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

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 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 the 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 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 VARIAB LES:

conditional formatting

Screenshot_824

Screenshot_825

Screenshot_826

Screenshot_827

Screenshot_828

Screenshot_829

Screenshot_830

Screenshot_831

Screenshot_832

Screenshot_833

Screenshot_834

Screenshot_835

Screenshot_836

Screenshot_837

Conditional formatting – Boolean variables

  • Create a list report with the following items
  • Product line, Product type, Product name, Margin
  • From conditional explorer click on variables
  • From insertable objects
  • Drag the Boolean variable and drop on variable window
  • Define the following expression in 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

CONDITIONAL FORMATTING – BOOLEAN VARIABLE

Screenshot_838

Screenshot_839

Screenshot_840

Screenshot_841

Screenshot_842

Screenshot_843

Screenshot_844

Screenshot_845

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 on 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 VARIAB LE

Screenshot_846

Screenshot_847

Screenshot_848

Screenshot_849

Screenshot_850

Screenshot_851

Screenshot_852

Screenshot_853

Screenshot_854

Screenshot_855

Screenshot_856

Screenshot_857


 

0 Responses on Conditional Formatting in Cognos Report Studio"

Leave a Message

Your email address will not be published. Required fields are marked *

Copy Rights Reserved © Mindmajix.com All rights reserved. Disclaimer.
Course Adviser

Fill your details, course adviser will reach you.