### PageNumber

Basic and Crystal syntax.

##### Returns

Whole Number

##### Action

PageNumber inserts the current page number as a field in a formula.

##### Typical uses

Use this function any time you want to determine the page number, at print time, and use that number in calculating formula results. For example, you can use this function when you want to print something on certain pages and not on others.

##### Examples

The following examples are applicable to Crystal syntax:

`PageNumber`

Creates a field containing the current page number that you can place anywhere on the page. Using this formula is the equivalent of using the Page Number field in the Special Fields folder in the Field Explorer.

If PageNumber > 1 Then
PageNumber
Else
0

Creates a field that prints the page number on every page but the first. By activating the Suppress if Zero check box on the Boolean tab (Format Editor) of the Format Editor, the formula will print nothing on the first page instead of a zero.

Note:

- You do not have to have a page number field in your report to use the PageNumber function in a report formula.
- Using this function in a formula forces the formula to be evaluated at print time.

  For more information on evaluation time considerations, see the Evaluation Time functions.

Seagate Software, Inc. http://www.seagatesoftware.com Please send comments to: techpubs@seagatesoftware.com