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!

color of horizontal lines

Status
Not open for further replies.

johnugly

Programmer
Jun 21, 2004
31
BE
I have a report where I use alternating linecolors depending on the recordnumber. white/silver..
Now when I change of group i want that group to begin with a white line and not silver(like its now in some cases).
How can I do this? isnt there an event "onChangeOfGroup" or something,
thanks
 
Use a running total that resets on change of group instead of recordnumber. Create the running total {#cntwingrp}: Select a recurring field, count, evaluate for every record, reset on change of group. Then go to format->section->details->color->background->x+2 and enter:

if remainder({#cntwingrp},2) = 0 then crSilver else crNocolor

-LB
 
thanks that worked! But how can I reset the running total on change of page? thanks in advance.
 
To reset on change of page, you need to use a different approach. Create two formulas:

//{@pagereset} to be placed in the page header:
whileprintingrecords;
numbervar pagecnt := 0;

//{@pagecnt} to be placed in the details section:
whileprintingrecords;
numbervar pagecnt := pagecnt + 1;

Then go to the section expert->details->color->background->x+2 and enter:

whileprintingrecords;
numbervar pagecnt;

remainder(pagecnt,2) = 0

If you want to reset on change of group or page, then also add the reset formula to the group header.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top