|A client asked me "How can one change the banding on his simple list report, to alternate every 2 records?"|
Using the MOD function, this divides one number by another and returns the remainder.
- Right click on the Details section margin
- Select the Section Expert menu option
- In the Section Expert dialog box, click on the Color tab
- Press the Conditional Formating [X-2] button
- Enter the following formula:
if (RecordNumber+1) mod 4 < 2 then Color(242,255,242) else Color(253,234,252)
Note: If the (RecordNumber +1) is not added the first record will always be incorrect colour.
It follows that to create a report that alternates colours every 3 records, the formula is:
if (RecordNumber+2) mod 6 < 3 then Color(242,255,242) else Color(253,234,252)