Site Search:
Sign in | Join | Help
4Penny.net

Crystal Reports

Notes, Tips and Tricks on Developing using Crystal Reports

Grey Bar (or Green Bar, or Blue Bar) for Crystal Reports

Often a report has so much data, it's hard to follow the line across the page. Customers ask me to 'put lines across the report so I can read it better, like Excel'

I think a more effective technique is to alter the background color of every third line. Here is the code to do that:

if int(RecordNumber/3)/2 = int(int(RecordNumber/3)/2) then crsilver else crWhite

This uses the Crystal 'RecordNumber' variable to determine what line we're on, then runs a simple algorythm against it to give us silver or white for the background color. Place this code in the Section Expert, under the Detail. Click on the Color tab, then the code button and post this in.

 

 

 

Comments

No Comments

Leave a Comment

(required)  
(optional)
(required)  
Add

About Steve Gray

Steve is a seasoned (translate: old) developer in VB and ASP.NET. He spends most of his time in Dynamics GP, writing custom mods for consulting firms. Crystal reports, eConnect, VS Tools for Dynamics... anything that comes along.