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

Reset background color 1

Status
Not open for further replies.

pgtek

Programmer
Sep 28, 2001
1,180
CA
Hi
I have a problem in the background color.
I have a report that has a 1 group, detail section and page
n of m

heres my problem
i have format my group to keep together and repeat group heading on new page.

in the report footer i have reset page number on change of group.

in the detail section i have this formula
if Remainder(RecordNumber, 2) = 0 then white
else silver

that works fine on the first page i get the first record silver and the next white that is fine but when it goes to the second page it display white background instead of silver on the first record it post in the detail section.
I want to have silver background to be the first on the new page.
and when the group changes i want the same result as the first group meanning the first record silver and when the page changes to page 2 i want silver detail record to be the first does not matter if the record number is even or odd
i want the first record that is displayed on first page and the pages after to be silver for the first record that is displayed
Is this possible?

example

group1 page 1 of 2

detail section:
record 1 silver
record 2 white
record 3 silver

group1 1 page 2
detail section:
record 1 silver
record 2 white



group2 page 1 of 2

detail section:
record 1 silver
record 2 white
record 3 silver

group1 1 page 2
detail section:
record 1 silver
record 2 white
record 3 silver



Thanks for your help

pgtek
 
You can do it with two formulas:
[tt]
//@Reset
//Put this in your Group Header
//This will work as long as you're repeating the headers on each page
//If you decide to turn that off, you can put this in the page header as well

whileprintingrecords;
NumberVar lineNum :=0;

//@Increment
//Put this in your Details section

whileprintingrecords;
NumberVar lineNum := lineNum + 1;
[/tt]

Then, change your suppression formula to:
[tt]
whileprintingrecords;
NumberVar lineNum;

if remainder(lineNum,2) = 0 then crWhite else crSilver
[/tt]
-dave

 
Thanks

work like a charm :)

pgtek
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top