Hi all - This has me quite puzzled. I'm having to fix a number of programs where the page number isn't properly outputting to the text file.
I've got the "output to value(OutFile) PAGED", and the frame is set to PAGE-TOP, but the output always shows "Page 1" on every page, even if there's 100 pages.
I've placed the page-number function in other spots, thinking maybe it's a placement thing, but then I'll get them on every record, even though the page number does change for each page - I'll just have 30 records all listing "page 1", 30 more listing "page 2", etc. But where we want it (shown below, although I'm open to moving it elsewhere as I tried), it's always "Page 1". Help?
I've got the "output to value(OutFile) PAGED", and the frame is set to PAGE-TOP, but the output always shows "Page 1" on every page, even if there's 100 pages.
I've placed the page-number function in other spots, thinking maybe it's a placement thing, but then I'll get them on every record, even though the page number does change for each page - I'll just have 30 records all listing "page 1", 30 more listing "page 2", etc. But where we want it (shown below, although I'm open to moving it elsewhere as I tried), it's always "Page 1". Help?
Code:
FORM WITH FRAME f-label132 PAGE-TOP NO-BOX NO-LABELS WIDTH 180 STREAM-IO.
IF FIRST-OF(tpd.site) THEN
DO:
OutFile = "<path hidden>\sp\oor" + tpd.site + STRING(TODAY,"999999") +
SUBSTRING(STRING(TIME, "HH:MM"), 1, 2) + SUBSTRING(STRING(TIME, "HH:MM"), 4, 2) + ".txt".
OUTPUT TO VALUE(OutFile) PAGED.
DISPLAY
SKIP(1)
"openord-site O P E N O R D E R S R E P O R T Page: " PAGE-NUMBER FORMAT ">>9"
" Order Due Date LN# Ord Date Qty OH Qty Avl Item Description Qty Ord Qty Opn Qty PO Qty Job V# Exp Res"
"---------- -------- --- -------- ---------- ---------- ----------------------- ------------------ ---------- ---------- ---------- ---------- -- --- ---"
with frame f-label132.
END.