Crystal Reports – How to apply alternative line shading

The following steps show how to make the ‘details’ row in a crystal report using alternative line shading.

In this example we will be using a light grey colour (RGB 239,239,239) for even rows – but you can select any colour of your choice – Rapid  Tables can help you select another colour.

This is what the report looked like before shading is applied:

  1. With the report open, click on the ‘Report’ menu then ‘Section Expert’
  2. With the Details section selected click on the ‘Color’ tab
  3. Click on the formula button
  4. Enter in the following formula
  5. IF RecordNumber mod 2 = 0 THEN color(239,239,239) else crWhite
  6. Click ‘Save and close’
  7. Every second row will now have a light grey shading applied to the background.

Was this article helpful?

Related Articles