Alternating background colors for rows

Another typical use of multiple sections is to vary the background color in alternating lines for the Details section of a report in order to improve readability (a greenbar-paper effect).

To alternate background colors for rows
  1. Use the Section Expert to insert a second Details section. You should now have Details A and Details B sections. See Working with sections.
  2. While in the Section Expert, highlight Details A in the Sections list, click the Color tab, and set the background color to White.
  3. Click the Common tab, click the Conditional Formula button to the right of Suppress (No Drill-Down), and type the following formula in the Format Formula Editor when it appears:

Remainder (RecordNumber,2)<>0

«This formula divides the record number by 2 and if the remainder is something other than zero (which will happen for every odd numbered record), it tells the program to suppress the section.»

  1. Click Save and Close.
  2. Now select Details B and set the background color to Green.
  3. Use the technique from Step 3 to set Suppress conditionally for this section using the following formula:

Remainder(RecordNumber,2) = 0

«This formula divides the record number by 2 and if the remainder is equal to zero, it tells the program to suppress the section.»

  1. Create the report and make certain that the information and layout of each of the Details sections is identical. In other words, whatever objects you place in Details A should be placed into Details B as well.

Now when you run the report, the program will print every even numbered line with a white background and every odd numbered line with a green background.



Seagate Software, Inc.
http://www.seagatesoftware.com
Please send comments to:
techpubs@seagatesoftware.com