Sunday, January 1, 2012

Cognos 10 Report Formating using Conditional Variable:


Report Formating using Conditional Variable:
Applying a formating, based on a data item value is conditional formating.
For this, we need to define a condition-variables

There are three types of variables:
Report Language: For achieving Multi-lingual
Boolean: Values either Yes or No.
String: Values based on Condition
   

In this excercise, we will see Boolean variable:
1- Create a list report with Country, Year, Sales Amount, Sales Quantity
2- Now, we want to highlight values under 15 for Sales Quantity in RED COLOUR
3- While, values over 15 for Sales Quantity in GREEN Colour.            
4- Go to Condition Explorer, create a Boolean Variable.
5- Define a condition: SalesQuantity < 16
6- Click Ok and Close the expression editor.
7- Notice the possible values on the right side of the condition-explorer page YES/NO
8- Go back to Page Explorer.
9- Select the Sales Quantity - column body
10- This is an important step: Being on the Report Page, take your mouse pointer over condition explorer
11- From the available values for the Boolean condition, we just created, select YES
12- Notice the bar colour change to green - this indicates: the report layout while condition is VALID
13- Select the Style variable to Boolean1- then Set back ground colour for Sales Quantity to RED
14- AGAIN: From the available values for the Boolean condition, we just created, select NO
15- Notice the bar colour change to green - this indicates: the report layout while condition is INVALID
16- Select the Style variable to Boolean1- then Set back ground colour for Sales Quantity to GREEN
17- Run the report and Notice the background colour.

SO THATS IT..........

************************************************************************************************
Report Formating using Conditional Variable:
Applying a formating, based on a data item value is conditional formating.
For this, we need to define a condition-variables

There are three types of variables:
Report Language: For achieving Multi-lingual
Boolean: Values either Yes or No.
String: Values based on Condition
   
In this excercise, we will see String variable:
1- Create a list report with Country, Year, Sales Amount, Sales Quantity
2- Now, we want to highlight values under 10 for Sales Quantity in RED COLOUR
3- While, values between 10-20 for Sales Quantity in Yellow Colour.            
    While, values over 20 for Sales Quantity in Green Colour.  
4- Go to Condition Explorer, create a String Variable.
5- Define a case condition: GT / LT / BT     (Greater Than / Less Than / Between)
case
when [Query1].[Sales Quantity] < 10 then('LT')
when [Query1].[Sales Quantity] > 20 then('GT')
else('BT')
end

6- Click Ok and Close the expression editor.
7- We need to create the possible values on the right side of the condition-explorer page
8- Create a set of possible values as defined in case condition. GT / LT / BT -- Without the Quotes
9- Go back to Page Explorer / Select the Sales Quantity - column body
10- This is an important step: Being on the Report Page, take your mouse pointer over condition explorer
11- From the available values for the String condition, we just created, select LT
12- Notice the bar colour change to green - this indicates: the report layout while condition is VALID
13- Select the Style variable to String1- then Set back ground colour for Sales Quantity to RED
14- AGAIN: From the available values set BT to yellow and GT to green
15- Run the report and Notice the background colour.
SO THATS IT.......... 
         

2 comments:

  1. Hi,
    I'm trying to use a conditional drill-through to highlight only columns that meets certain criteria on a crosstab in Cognos report.

    First Conditions
    Rate >.995

    Second Condition
    Rate<.995

    I want to show both values on the crosstab but only need to hyperlink the Second Condition
    Rate<.995

    Can someone explain how this can be resolved.
    Thank you in advance.

    ReplyDelete