User Tools

Site Tools


prop_nextpageno.htm
Navigation:  Language Reference > App C - PROP: Runtime Properties > Complete Property List >====== PROP:NextPageNo ====== Previous pageReturn to chapter overviewNext page

A property which sets or returns the next page number in a report.

When returning the NextPageNo property, consider that the page number may not yet have been determined by the print engine. It has many “page-based printing” features (e.g. WITHPRIOR/WITHNEXT) that may cause it to cache printed details and delay page break determination. To be sure that the page number you get is the final one after all cached details use the ENDPAGE statement.

The next page number may also be reset using the PAGEBEFORE or PAGEAFTER attributes on a DETAIL structure.

Example:

CustRpt  REPORT,AT(1000,1000,6500,9000),THOUS

         HEADER

          STRING(@n3),USE(?Page),PAGENO

         END

Detail    DETAIL,AT(0,0,6500,1000)

          STRING,AT(10,10),USE(Fil:Field)

         END

        END

CODE

OPEN(File)

SET(File)

OPEN(CustRpt)

LOOP

 NEXT(File)

 IF Fil:KeyField <;> Sav:KeyField      !Detect group break

  Sav:KeyField = Fil:KeyField         !Detect group break

  ENDPAGE                             !Force page break

  CustRpt{PROP:NextPageNo} = 1        !Every group starts on page one

 END

 PRINT(Detail)

END

CLOSE(CustRpt)

CLOSE(File)

See Also:

REPORT, ENDPAGE, PAGEBEFORE, PAGEAFTER

prop_nextpageno.htm.txt · Last modified: 2021/04/15 15:57 (external edit)