COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: cognosmanager on 29 Apr 2012 01:09:37 PM

Title: Color odd and even rows
Post by: cognosmanager on 29 Apr 2012 01:09:37 PM
Hi All,

How to get background color on rows for eg first row should come in red color, second yellow, third red, and then again yellow and so on.

Title: Re: Color odd and even rows
Post by: HalfBloodPrince on 30 Apr 2012 01:32:53 AM
Hi try this out

1]Create a calculated column as Row with calculation running-total (1). This will gives you row no.

2 ]then create a Boolean variable with expression  mod([Query1].[Row],2)=0

3]then from ansister button select  List column body style and set  style variable as Boolean go to conditional explorer
and set background color property for no as Red  and For yes as Yellow ( As per your requirement)
and run.
Title: Re: Color odd and even rows
Post by: cognosmanager on 30 Apr 2012 04:54:18 AM
Thanks a lot for your help.