Crystal Reports & SQL Reporting Services Training Consultants
Account Log in:
Discover what you really want, by looking at what you envy in others
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 use the MOD Function with Hidden or Suppressed Rows of Data in Crystal Reports?

Earlier this year I added a couple of blog posts, about using the MOD function to create a banded report.  I had a couple of comments, pointing out that although the formulas were correct it did not take into consideration any hidden or suppressed rows of data, in Crystal Reports.

So here's an amendment to those posts.

The two blog posts in question are:

The MOD function

How Do I Create a Banded Report


  1. In the Section Expert, select the Details section
  2. Click on the conditional format button for the Suppress option
  3.  Enter the Suppression formula: {Tablename.FieldName} = Value
  4. Create a new formula field called Index
  5. Enter the formula:

    WhilePrinting records;

    NumberVar Counter;

    If {Tablename.FieldName} <> Value then Counter := Counter +1;

  6. Add the Index formula field to the Details section
  7. Suppress the Index formula field
  8. Create the following conditional formatting formula for the Details section:

if {@index} mod 2 = 0 then crSilver else CrNoColor

If you have any questions, leave us a comment below, or need any assistance, please do not hesitate to Contact Us


Name *

Email Address *

Comment *

To prove you are human what is:

19 + 83 =