Xbasic

PAGECOUNT Function

Syntax

Integer_Count as N = PAGECOUNT([g group])

Arguments

group

g

Description

PAGECOUNT() returns the number of pages in a report.

This expression is useful if you want to print a field that shows the current page number and the total number of pages in the report page header or footer. For example, "Page 3 of 10". The Report Layout editor allows you to drag the PageXofY field directly from the Drag-and-Drop list onto the report. However, using the PAGECOUNT() function, you can create your own format.

Example

"Page " + alltrim( str(pageno() ,5,0) ) + "of a total of " + alltrim( str(pagecount() , 5, 0) ) + " pages"
-> "Page 3 of a total of 20 pages"

See Also