If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Alternate color formatting for list

Started by sunny bachan prasad, 30 Nov 2017 07:53:50 AM

Previous topic - Next topic

sunny bachan prasad

Hi,
I am using cognos 10.2 and have Oracle DB. I have a list inside list report which is connected through Master detail relationship and have to apply alternate color formatting to the list report any idea. How i can do it?

Thanks in adavnce,
Sunny

BigChris

I haven't done it in a very long while, but the principle is that you create a running-count of the records, then find the modulus of dividing that by two. You then set up a conditional format based on that mod whereby if it's 0 you set the background to be one colour, and when 1 you set it to another.

Stepharia

You can use the RowNumber() function with the modulus function which BigChris mentioned to achieve this.

mod (RowNumber (), 2) = 0

Enter the above as an advanced condition under conditional styles and set the formatting for it.

sunny bachan prasad

Hi BigChris/Stepharia,
Thanks for your time but these code will not work in my senario. Since i have a list inside list which are connected through M/D relationship and we are showing data from both the list.So when i am applying color formatting on outerlist inner  all row of the inner list are getting colored.

hespora

Works just fine with a nested list; see screenshot attached.

This is one conditional style applied to both columns of the outer list, coloring in gray and silver, and a *different* conditional style in the nested list, coloring in teal and lime.

sunny bachan prasad

Thanks for  all for the time. Its working correctly now.