Hi All,
I have a list report in which I want to display the records fetched into two different colors in the list.Please suggest.
Regards,
dipsy
This is a fairly common technique which you should find described in the ReportNet forums, FAQs, or Cognos' Knowledge Base.
Hi,
Almeids is correct - this is a well-known technique. The basics are:
1. Add a query calculation containing a running-count summary eg running-count([Order_no])
2. Add a second query calculation as follows: mod([First calc],2)
3. Set up a boolean variable in the condition explorer with the expression [Second calc] > 0
4. Select 'list columns body style' using the Select Ancestor button, select the Style Variable property, and pick your boolean variable.
5. Hover your mouse over the Condition Explorer, select the 'Yes' variable value, then set the Background Colour property. Using the condition explorer, switch to the 'No' variable value and repeat using a different colour.
6. If your calculations exist in the query but are not shown in the list, select the list using the Select Ancestor button, go to the Properties property, and enable the calculations as properties of the list.
Regards,
MF.
Hi,
Thanx for the reply...
Actually i have implemented dynamic sorting in my reports.... so whenever i click on any of the columns of the list report the order of the color becomes uneven.... i.e. alteranate colors for the rows is not maintained.
Any suggestions on this plz.....
Regards,
dipsy
Depends... How did you implement your dynamic sorting?
MF.
Have you tried using RowNumber() report expression as opposed to running-count?
Hi,
Its not allowing me to use RowNumber() in a dataitem.
Regards,