Consultor Eletrônico



Kbase P27319: How to output some variables at the top of each new page?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   9/23/2003
Status: Unverified

GOAL:

How to output some variables at the top of each new page?

FIX:


The following code demonstrates the use the PAGE, PAGE-SIZE and LINE-COUNTER FUNCTIONS to control paging and output a variable at the head of every new page:

/************************/
DEFINE VARIABLE cSomeCharacterVariable AS CHARACTER NO-UNDO.
ASSIGN
cSomeCharacterVariable = "XXXXXXXXXXX".

OUTPUT TO TERMINAL PAGED PAGE-SIZE 30.
FOR EACH customer NO-LOCK:
IF LINE-COUNTER = PAGE-SIZE THEN DO:
PAGE.
DISPLAY cSomeCharacterVariable @ name NO-LABEL.
DOWN.
END.
ELSE DO:
DOWN.
DISPLAY NAME cust-num NO-LABEL NAME NO-LABEL .
END.
END.
OUTPUT CLOSE.
/************************/