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

Custom PageNumber don't work 3

Status
Not open for further replies.

panarra

Programmer
Mar 30, 2001
2
ES
I need to check if "global" page number is pair or odd in "New Page Before" formula of Page Head Section. I can't use PageNumber because I reset it after a group section

I'm trying to build a custom page counter like this:

EvaluateAfter (PageNumber);
Global numberVar npage;
npage := npage + 1;

This formula doesn't work. The npage value only increments in first page of group section in which I reset PageNumber.

P.D. Sorry, I don't speak english.... :D
 
Your english is fine...

EvaluateAfter (PageNumber);
Global numberVar npage;
npage := npage + 1;
*****************************

The "evaluateAfter" is not necessary...I would do your task this way.

@InitializeCounter (placed suppressed in Report Header)
WhilePrintingRecords;
numberVar npage := 0;

Now in the Page Footer I would put this formula

@IncrementPage (suppress the formula in Page Footer)
WhilePrintingRecords;
numberVar npage;

npage := npage + 1;

Now in the Page Header section where you want to split to a new page I would put the following formula in the conditional "New Page Before".

WhilePrintingRecords;
numberVar npage;

If npage = {something} then
true
else
false;

where {something} is you split criteria.

Placing the formula in the page footer lets the custom pagenumber increment naturally.



Jim Broadbent
 
Thanks !!!

My report is running. I only changed

@InitializeCounter
WhilePrintingRecords;
numberVar npage := 0;

by

@InitializeCounter
WhilePrintingRecords;
numberVar npage := 1;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top