Reader Level:
ARTICLE

Alternate Row Color in Crystal Report

Posted by Suparba Panda Articles | Crystal Reports C# June 07, 2005
This article shows how to develop reports with alternating row colors.
  • 0
  • 0
  • 164845

Most of the time while developing reports people wonder how to have alternating row colors in the report like below.

Customer Name Address City State Zip
Suparba panda 123 olive rd St Louis MO  54678
John Doe 456 Tree drive Raleigh NC 14676
Jane Doe 768 Hudson rd Atlanta GA 76555

There is a cool trick to it.

Go to the format section of the Details. Click the Color Tab. Then click the button next to the Background Color CheckBox..

CR1.gif

In the formula editor of background color, type the following:

if RecordNumber mod 2 = 0 then crSilver else crNoColor.

CR2.gif

Save and close the editor.

And now when you run the report you will see alternate colors of silver and white in the details section.

Conclusion

In this article you learnt how to have alternating colors in the report detail section.

Article Extensions
Contents added by mahabubul sony on Aug 21, 2013
COMMENT USING

Trending up