Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Alternate Row Colors - Cognos 8.4

Status
Not open for further replies.

qberta01

Programmer
Nov 14, 2005
113
Is it possible to alternate row colors in cognso 8.4 BI? I saw one post already in this forum about alternating the colors, but it did not help. Also, I did find a document at the Cognos site, but it did not work. I am using a list report.

Any thoughts, ideas....would be great..

thx,

Q.
 
Yes, it actually is pretty simple:

1. Create a dataitem mod(running-count(1),2) : Rowshader
2. Create a string variable the rowshader item and add values 0 and 1
3. Select the listcolumn and and assign the style variable
4. Choose background colors for the values 0 and 1

The tricky bit is to make sure that the running-count(1) index is in the same order as the data displayed in the list (otherwise the alternating fails)



Ties Blom

 
That worked! Thanks. Just wanted to add that I had to set the style for each column. Also, the RowShader had to be on the report to avoid an error. I set the box type to none so it's not visible.

thx again!

Q.
 
You do not need to set it as object in the report layout. you can simply associate it in the list properties and then Cognos can work with it even if it is not in the list-layout..

Ties Blom

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top