PreviousNextIndex

PAGE-SIZE function

Returns the page size (lines per page) of an output destination as an INTEGER value. If the output stream is not paged, PAGE-SIZE returns a value of 0.

Syntax

PAGE-SIZE [ ( stream | STREAM-HANDLE handle ) ] 

stream
STREAM-HANDLE handle
Example

This procedure prints a customer report categorized by state. At the end of each state category, it tests to see if there are at least four lines left on the page. The LINE-COUNTER function returns the current line number of output. If that number plus four is greater than the total number of lines on the page (returned by the PAGE-SIZE function), then the procedure skips to a new page. If there are four or more lines left, the procedure skips a line before printing the next customer record.

r-pgsize.p
OUTPUT TO PRINTER. 
FOR EACH Customer NO-LOCK BREAK BY Customer.State: 
  DISPLAY Customer.CustNum Customer.Name Customer.Address Customer.City 
    Customer.State. 
  IF LAST-OF(Customer.State) THEN DO: 
    IF LINE-COUNTER + 4 > PAGE-SIZE THEN PAGE. 
    ELSE DOWN 1. 
  END. 
END. 

See also

DEFINE STREAM statement, OUTPUT THROUGH statement, OUTPUT TO statement, Stream object handle


OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex