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

Reset Shading on each new page 2

Status
Not open for further replies.

ekta22

IS-IT--Management
May 3, 2004
359
US
I am using the formula below to do alternate shading in my details section.
I want that on every new page the first record color should always start with CrNoColor shading first just like on first page. How can I reset this?

if RecordNumber mod 2 = 0 then CrYellow else CrNoColor
 
Use a variable which increments on each record and resets on new page

@reset
//place this in page header

global numbervar n:=0;

@eval
//Place this in detail

global numbervar n:=n+1;

In your shading control

global numbervar n;
if n mod 2 = 0 then CrYellow else CrNoColor

Ian
 
But add "whileprintingrecords;" at the beginning of each formula.

-LB
 
I just noticed something. The above solution seems to be working great except for certain pages. I have multiple detail sections - Da, Db, Dc & Dd. At the top of certain pages ONLY Da section is highlighted in yellow and the other detail section - Db, Dc & Dd are in white. I see it only on the top record of certain pages. Not all.

I added the shading control formula in every detail section and placed the @eval formula in Da only.
 
I'm surprised to see this, but anyway, the fix is to move the reset formula to the page footer.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top