Previous Next

PAGE-NUMBER function
Returns the page number of the output destination as an INTEGER value. If the output stream is not paged, PAGE-NUMBER returns a value of 0.
Syntax 
 
PAGE-NUMBER [ ( stream | STREAM-HANDLE handle ) ]
stream
The name of an output stream. If you do not name a stream, PAGE-NUMBER returns the page number of the default unnamed output stream.
STREAM-HANDLE handle
The handle to an output stream. If handle it is not a valid handle to a stream, the AVM generates a run-time error.
Example 
This procedure creates a customer report with a page number on each page:
 
OUTPUT TO pagenum.txt PAGED.
 
FOR EACH Customer NO-LOCK:
  FORM HEADER "Customer report" AT 30
    "Page:" AT 60 PAGE-NUMBER FORMAT ">>9" SKIP(1).
  DISPLAY Customer.CustNum Customer.Name Customer.Address Customer.City
    Customer.State Customer.Country.
END.
See also 
DEFINE STREAM statement, OUTPUT TO statement, PAGE statement, Stream object handle

Previous Next
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates.