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
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.
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.
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.
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.
Thanks for all for the time. Its working correctly now.