Friday 24 October 2014

How to create a list report that alternates the row colors in Cognos Report Studio

Style Variables in Cognos and Highlighting the Alterative Rows by using Style Variables

Steps:

1. Open Report Studio against Go Sales and Retailers Sample Package
2. Select List report, and drag in Product type, Product name, Quantity items
3. Mouse over on Query Explorer, click Query1
4. Click Toolbox tab, and drag in a data item in the Query1 ( Rename Data item as "RunningCount" )
5. In the data item has the expression as
running-count([Product name])

and Test the Expresssion Definition

6. Mouse over on Condition Explorer, click Variables
7. Drag Boolean Variable in Variables pane as expression
From Report Functions drag 
mod ( [Query1].[RunningCount],2) = 1     (Note Get "1" Value from Select Value on top , beside validate button)

8. Mouse over on Page Explorer, click Page1
9. Select check Property as "list" ; 
Change Properties:  Under Data Properties , Click on Properties and select "RunningCount" Data Item

10.Select check Property as "List Coulms Body Style"
Change Conditional Propeties: Style Variable as " Boolean1"

11. Under Conditon Explorer : Click on Boolean1 Value "Yes"
Select  the  "List Coulms Body Style" Properties
Changhe the Color & Background : Backgroun Colour as " Yellow"

12. Run the report


For Vedio:
http://www.youtube.com/watch?v=AepMssI2oB8

No comments:

Post a Comment