Author Topic: Alternate row colors in a report  (Read 2633 times)

Offline naveen10046

  • Full Member
  • ***
  • Posts: 22
  • Forum Citizenship: +0/-0
Alternate row colors in a report
« on: 10 Mar 2010 08:36:08 am »
Hello All,
I want to display my list report in alternate colours for each row as shown  below. Can anyone explain me how to do this.




With Regards
Naveen :)

Offline angela

  • Senior Member
  • ****
  • Posts: 64
  • Forum Citizenship: +4/-0
Re: Alternate row colors in a report
« Reply #1 on: 11 Mar 2010 04:16:44 am »

Online MFGF

  • Never knowingly correct
  • Super Moderator
  • Statesman
  • ******
  • Posts: 2,908
  • Forum Citizenship: +137/-1
  • Cognos Software Muppet
Re: Alternate row colors in a report
« Reply #2 on: 11 Mar 2010 06:29:06 pm »
Good old Blom saves the day again! Thanks for the link Angela.  :)
Meep!

Offline naveen10046

  • Full Member
  • ***
  • Posts: 22
  • Forum Citizenship: +0/-0
Re: Alternate row colors in a report
« Reply #3 on: 16 Mar 2010 10:54:40 am »
Thanks ;D Angela

There is another way as well.
1)create a Boolean variable with expression " mod(RowNumber(),2)=1 "
2)Go to conditional explorer and select ' yes ' under the boolean variable.
3)Then select the entire report and set the backgroung color as "blue".
This one is simple and works fine...
« Last Edit: 16 Mar 2010 11:01:10 am by naveen10046 »

Offline dhanu

  • Associate
  • **
  • Posts: 2
  • Forum Citizenship: +0/-0
Re: Alternate row colors in a report
« Reply #4 on: 20 Aug 2010 09:45:11 am »
Suppose you are creating a report with two data items
Customer_Name and Total-sales respectively.

Create two new data items.
1.Dataitem1: Running-count([CUSTOMER_NAME])
2.Dataitem2: Mod([Data Item1],2)

Create a variable :
Boolean [Query1].[Data Item2]=1 or 0

Come to conditional explorer bar, select YES, under
properties select the background color.

Come to conditional explorer bar, select NO, under
properties select the background color.

Save report and run.