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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TIP: Alternating GROUP band colors...

Status
Not open for further replies.

jschodde

Technical User
Jan 28, 2001
42
US
If you would like to have alternating white/silver band colors on your group sections, here's what you do:

1. Right-click on the group footer and select "Format Section..."

2. In the section expert dialog box, click on the "Color" tab and check the "Background Color" to be ON.

3. Click on the formula editor button next to the "Background Color" checkbox to display the formula editor.

4. Type in this formula and save:

if remainder(groupnumber,2)=0 then crwhite else crsilver

5. Now print preview and you should see alternating white/silver rows on your group!

-Jeff
 
One problem though. If you have multiple grouping layers, your secondary groups are counted as a group in the calculation. You could be left with some funky looking colorations.

Also you may want to consider using defaultattribue instead of crWhite Mike
 
Good points...thanks!

-Jeff
 
I usually put a counter in and increment it every place I want the color to change (ie to make it look like it is on greenbar)

So my formula looks something like:

numbervar counter;

counter := counter + 1;

remainder(counter,2)=0 then crwhite else crsilver

I usually put all my intializers in the report header format sections.

Lisa
 
Very cool idea...thanks Lisa.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top