Thursday, July 3, 2014

Alternating and Varying Row Styles in Cognos Report studio (5 rows 5 colors in list report)



Shows how to set various styles to rows in cognos report studio based on row sequence or on data.

Row 1: Red
Row 2: Blue
Row 3: Green
Row 4: Yellow
Row 5: purple
Row 6: Red
Row 7: Blue
Row 8: Green
Row 9: Yellow
....



1.Select List report, and drag in Product type, Quantity items

2.Click the data items  to define a conditional style, and then click the conditional styles button
  Click the add button  and click Advanced Conditional Style
  Type a name for the conditional style.
  Click the new button  and specify the expression that defines the condition.
  
  mod(running-Count([Product type]),5) = 1   Please define the background color 'Red'
  mod(running-Count([Product type]),5) = 2   Please define the background color 'Blue'
  mod(running-Count([Product type]),5) = 3   Please define the background color 'Green'
  mod(running-Count([Product type]),5) = 4   Please define the background color 'Yellow'
  mod(running-Count([Product type]),5) = 0   Please define the background color 'purple'

No comments:

Post a Comment