Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

alternatve shading

Status
Not open for further replies.

hsandwick

Programmer
Sep 10, 2001
286
0
0
US
How do I shade alternate rows in a report? Thanks.
 
In the Help index, look up Background colors. It explains both how to set background colors, and how to set up alternating colors/shades.
 
Thanks for the advice. I need to take it one step further. Now, I have entries that are white (from the example), with lines between each row that are now colored/shaded/whatever.

I want to add a formula that will create the first row with data white, and the next row with data colored/shaded, and so on, with no colored/shaded row in between.

Does anyone have a quick fix for this?

 
Yes,

The easiest way to do this is to create your detail section, then choose "Format Section" by right clicking on the section title on the left in design view. Click on the "Color" Tab and then click the "Background color" check box. Click on the formula button (x-2 icon) and enter the following formula:
if recordnumber mod 2 = 0 then
crRed
else
crNoColor;

You can replace crRed with whatever color you would like. This formula will make the even rows red.

If your formatting requires more than colors, you could do this:
Create two detail sections. Duplicate the information on them (put in the same fields). Choose the background color for one of them and leave the other one white.

Then you will need to suppress them selectively. Choose format section and then for the white section, click the suppress check box and set the formula to RecordNumber Mod 2 = 0. Then for the colored background, set the suppress formula to RecordNumber Mod 2 = 1.

Good Luck,
Nathan Schultz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top