Release 10.1A: OpenEdge Development:
Progress 4GL Reference

> ## 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 `stream``

> Specifies the name of a stream. If you do not name a stream, Progress uses the unnamed stream. See the DEFINE STREAM statement reference entry in this book and the chapter on alternate I/O sources in OpenEdge Development: Programming Interfaces for more information on streams.

> Example

> This procedure prints a customer report, categorized by state, and starts a new page for each state:

> r-page.p
>     DEFINE VARIABLE laststate AS CHARACTER.

>     OUTPUT TO PRINTER.
>     FOR EACH customer BY state:
>       IF state <> laststate THEN DO:
>         IF laststate <> "" THEN PAGE.
>         laststate = state.
>       END.
>       DISPLAY cust-num name address city state.
>     END.

> #### Notes

> - If the current output destination is not a paged device (you did not use the PAGED option in the OUTPUT TO statement), the PAGE statement has no effect.

> - PAGE has no effect if you are already at the top of a new page.

> - If any PAGE-TOP or PAGE-BOTTOM frames are active, they are output prior to the next display.

> - See the chapter on alternate I/O sources in OpenEdge Development: Programming Interfaces for more information on streams.

> #### See also

> DEFINE STREAM statement, OUTPUT TO statement

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095