Description
PageNumber inserts the current page
number as a field in a formula.
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
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
("Field Explorer" dialog box) folder in the
"Field Explorer" dialog box.
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 Number tab (Custom Style dialog box) of the Custom Style dialog box
in the Format Editor dialog box, the formula will print nothing on the first
page instead of a zero.
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.