Previous Next

PAGE statement
Starts a new output page for PAGED output. No action is taken if output is already positioned at the beginning of a page.
Syntax 
 
PAGE [ STREAM stream | STREAM-HANDLE handle ]
STREAM stream
Specifies the name of a stream where output is paged. If you do not name a stream, the AVM uses the unnamed stream.
STREAM-HANDLE handle
Specifies the handle to a stream where output is paged. If handle it is not a valid handle to a stream, the AVM generates a run-time error. Note that stream handles are not valid for the unnamed stream.
Example 
This procedure prints a customer report, categorized by state, and starts a new page for each state:
 
DEFINE VARIABLE laststate AS CHARACTER NO-UNDO.
 
OUTPUT TO PRINTER.
FOR EACH Customer NO-LOCK BY Customer.State:
  IF Customer.State <> laststate THEN DO:
    IF laststate <> "" THEN PAGE.
    laststate = Customer.State.
  END.
  DISPLAY Customer.CustNum Customer.Name Customer.Address Customer.City Customer.State.
END.
Notes 
*
*
*
*
See also 
DEFINE STREAM statement, OUTPUT TO statement, Stream object handle

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