PrintSetPage() Method callback
<< Click to Display Table of Contents >> PrintSetPage() Method callback |
![]() ![]() ![]() |
Purpose
This callback method is invoked during the printing process to instruct the report object to prepare to print a certain page.
Syntax
<oReport>:PrintSetPage(oPtrDevice, nNextPageNo)
Arguments
oPtrDevice | The PtrDevice which has initiated the call to this callback function. |
nNextPageNo | The page number to be printed next. |
Return Values
nPageNo | The page number that the report object moved to and is prepared to print. This value can be less than nNextPageNo if nNextPageNo does not exist. |
PRINT_ERROR | Indicates an error occurred and printing should terminate. |
Description
This method is called to allow the report object to initialize itself for the printing of a specific page. Initialization can include moving record pointers or updating report total information.
This callback method is called if it exists as a method of the report object. The report object is specified in the <oReport> parameter of the PtrDevice:Init.
To calculate the number of pages being moved you must query the PtrDevice:CurrentPageNumber access. This number can be negative.
Example
// Calc the number of pages moved.
nPages := nNextPageNo - oPtrDevice:CurrentPageNumber