Page

Description

Gets the number of the current page.

Syntax

Page ( )

Returns

Long. Returns the number of the current page.

NoteCalculating the page count The vertical size of the paper less the top and bottom margins is used to calculate the page count. When the print orientation is landscape, the vertical size of the paper is the shorter dimension.

Examples

Example 1

This expression returns the number of the current page:

Page()

Example 2

In the report’s footer band, this expression for a computed field displays a string showing the current page number and the total number of pages in the report. The result has the format Page n of total:

'Page ' +  Page() + ' of ' + PageCount()

See also