Kbase P114840: The PAGE-NUMBER function is returning zero for all pages of the report.
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  4/3/2006 |
|
Status: Unverified
SYMPTOM(s):
The PAGE-NUMBER function is returning zero for all pages of the report.
Using OUTPUT STREAM, VIEW STREAM and DISPLAY STREAM statements.
OUTPUT STREAM sRpt TO Some.rpt PAGED.
VIEW STREAM sRpt FRAME hdr.
DISPLAY STREAM sRpt...
FORM HEADER
"PAGE: " PAGE-NUMBER
WITH PAGE-TOP FRAME hdr.
CAUSE:
The name of the STREAM is not passed as a parameter to the PAGE-NUMBER function. If a stream name is not specified as input parameter to the PAGE-NUMBER, the function returns the page number of the default unnamed output stream. As there is no output to the default unnamed output stream, the PAGE-NUMBER function returns zero.
FIX:
Pass the STREAM name as input parameter to the PAGE-NUMBER to get the correct page numbers of output to that stream. For example, the following code modifies the definition of the header above to produce the page numbers correctly:
FORM HEADER
"PAGE: " PAGE-NUMBER(sRpt)
WITH PAGE-TOP FRAME hdr.