Kbase P26431: _osprint prints 56 lines regardless of the p_PageSize parame
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  6/17/2003 |
|
Status: Unverified
FACT(s) (Environment):
Progess 9.1D
FACT(s) (Environment):
NT 4.0
SYMPTOM(s):
_osprint prints 56 lines regardless of the p_PageSize parameter passed to it?
Using the following statement to generate the output file that will be printed using an _osprint call:
OUTPUT STREAM rpt TO VALUE(fnr) PAGED.
CAUSE:
Using the PAGED option causes the output file size to be 'hard' formated to 56 lines per page.
FIX:
Use the PAGE-SIZE option to control the document page size and pass 0 to _osprint for the p_PageSize parameter to allow the printer to handle the paging:
The following code generates a file of 100 lines and sets its page size to 25.
DEFINE VARIABLE c AS CHARACTER NO-UNDO.
DEFINE VARIABLE i AS INTEGER NO-UNDO.
OUTPUT TO test.txt PAGE-SIZE 25.
REPEAT WHILE i < 100:
ASSIGN
i = i + 1
c = "This is my line number " + STRING (i).
DISPLAY c FORMAT "X(80)" WITH FRAME a DOWN WIDTH 132.
END.
The following call to _osprint will output the above file as desired:
DEFINE VARIABLE p_Printed AS LOGICAL NO-UNDO.
RUN adecomm/_osprint.p ( INPUT CURRENT-WINDOW,
INPUT "test.txt",
INPUT 0,
INPUT 1,
INPUT 0,
INPUT 0,
OUTPUT p_Printed ).
MESSAGE p_Printed
VIEW-AS ALERT-BOX INFO BUTTONS OK.