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!

Need to always have Color as first line on page

Status
Not open for further replies.

LTillner

MIS
Apr 23, 2002
96
US
I have several reports that use a 'green bar paper' effect and I have followed Crystal's way of setting that up with:

detail a (color) (Suppress formula): Remainder (RecordNumber,2)<>0

detail b (white) (Suppress formula): Remainder (RecordNumber,2)=0

I need to wrap each of these in an IF statement that will have the COLOR section always be the first line. or else changes the color of the section based on whether it is the first line on a page or not.

I have no clue how to tell if I am on the first record on any given page in a report or not. Can someone please advise if this is possible? And if so, how to do this?

 
Try adding a formula like this to your page header:

Formula name: {@ClearDetailCounter}
-------------------------------
WhilePrintingRecords;

NumberVar DetailCounter := 0;
-------------------------------


Then insert another formula in your detail section

Formula name: {@IncrementDetailCounter}
-------------------------------
WhilePrintingRecords;

NumberVar DetailCounter := DetailCounter + 1;
-------------------------------


Then in the Color tab for the details section in the Section Expert, check the X-2 button and write the following formula:

WhilePrintingRecords;

If Remainder (DetailCounter,2) <> 0 then
crGreen
Else
crNoColor;

 
Try adding a formula like this to your page header:

Formula name: {@ClearDetailCounter}
-------------------------------
WhilePrintingRecords;

NumberVar DetailCounter := 0;
-------------------------------


Then insert another formula in your detail section

Formula name: {@IncrementDetailCounter}
-------------------------------
WhilePrintingRecords;

NumberVar DetailCounter := DetailCounter + 1;
-------------------------------


Then in the Color tab for the details section in the Section Expert, check the X-2 button and write the following formula:

WhilePrintingRecords;

NumberVar DetailCounter;

If Remainder (DetailCounter,2) <> 0 then
crGreen
Else
crNoColor;

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top