Crystal Reports & SQL Reporting Services Training Consultants
Account Log in:
Beware of people with nothing to lose
Institute of IT Trainers - Freelance Trainer of the Year 2006 & 2009
Liverpool Business Connect Member
  Maximum Impact Solutions Limited - Reporting Solutions, Creating Answers
Reporting Solutions - Creating Answers, Crystal Reports, Dashboarding (Xcelsius) & SQL Reporting Services

The Maximum Impact Solutions Blog Feed ME!!!!


How Do I Create a Banded Report in Crystal Reports?

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.

  1. Right click on the Details section margin
  2. Select the Section Expert menu option
  3. In the Section Expert dialog box, click on the Color tab
  4. Press the Conditional Formating [X-2] button
  5. 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)


Name *

Email Address *

Comment *

To prove you are human what is:

66 + 5 =