Tuesday, July 1, 2008

List Report - 2 color rows

If you are using list report, and for better readability you want to use 2 colors for alternate rows in list then this can be achieved by the solution below-

Steps-
  • Create 2 extra data items in the query say dataitem1 and dataitem2. Define them as-
dataitem1 - running-count([any data item of query])/2
dataitem2 - _round([Data Item1],0)
  • Create a boolean variable say boolean1. Define it as-
[Query1].[Data Item1]=[Query1].[Data Item2]

  • Attach this variable 'boolean1' with all the columns of list i.e. select each column body and set boolean1 into their 'style variable' property.
  • Now go to conditional explorer and click on 'Yes' below the 'boolean1'. the central vertical bar will become green.
  • Now Select all the list columns and from background color property select first color you want.
  • If you want to keep second color as default color then save the report and run it to check or repeat the previous two steps to 'No' value of 'boolean1'.

No comments: