Thursday, January 31, 2013

Crystal Reports : Using Background Color

To make a report easier to read, you can alternate the background color to help different lines stand out. (Think of the old green and white striped paper you used to put in your tractor printer years ago)

To make this happen, we will need to format the Details Section of our report.

Step #1 : From the top-level menu, select Format Section.
Step #2 : Select the "Detail" section on the left hand side.
Step #3 : Click on the "Color" tab on the right hand side.
Step #4 : Click the [formula] button with the "x-2"on it to bring up the formula editor.
Step #5 : Paste in the following : if RecordNumber mod 2 = 0 then crSilver else crNoColor

This will alternate a white and silver background for each row printed.

Pro Tip : To alternate color for Group rows, paste the following into the Group section color formula: if GroupNumber mod 2 = 0 then crSilver else crNoColor

1 comment:

Anonymous said...

Please let me know if you're looking for a article writer for
your weblog. You have some really great posts and I think I would be a good asset.
If you ever want to take some of the load off, I'd really
like to write some articles for your blog in exchange for a link
back to mine. Please shoot me an e-mail if interested.

Cheers!

Derwick Associates