Home > BSPrinter documentation > Reference

GetPageNumber Method


Applies to: PrintPreview control , IPrinterEx object


Return Type: Long
Parameter(s):
In          Optional          PageIndex          As Variant


Description:

Returns the page number for a given page index. If PageIndex is omitted, it returns the page number of the current page.

Notes:

A report can have more than one document.
If in the middle of the Printing routine there is an EndDoc statement, the Print Preview dialog box will show more than one document. Each document will have its page numbers, and by calling this method it is possible to get the page number of any page.
The parameter PageIndex must have a number between 1 and PageCount.

The first page number can be set to other than 1 using the StartingPageNumber property. If there is more than one document in the report, the StartingPageNumber setting will be applied only to the first one.

See Also:

GetDocFirstPageIndex method
GetDocPageCount method
GetDocPageCount method
StartingPageNumber property
StartDoc event