Returns or initializes the number of the page currently printed.
Remark: iPageNum can be used to force the number of the first page to a number other than 1.
// Prints the page number
iPrint(iXPos(200) + iPageNum())
// Forces the page number to 10
iPageNum(10)
...
iEndPrinting()
Syntax
<Result> = iPageNum([<Page number>])
<Result>: Integer
Number of current page.
<Page number>: Optional integer
New number for the current page.
Remarks
iPageNum and reports created with the report editor
- iPageNum can be used in reports, provided that the print is started (in the "After printing" event of a break, for example). This function must not be used in the report opening code. You must use PageNumber.
- iPageNum should not be used in the pre-print code of a block. Indeed, the final size of block is not known in this process and the page number on which the block will be positioned may change.
- The result of iPageNum is not affected by the reinitialization of page numbers in the reports ("Reset the number of pages after printing the block" in the "UI" tab of a block description window).