how to write page break

Hello Everyone, hope you all are Well. :)

I have a related question:
Requirement:- I want to add a number count for every page break for example:
For every page break, frame's heading should be changed like "CUSTOMER'S INFO PAGE" 1,2,3 and so on..

Code:
DEF VAR l-count AS INT  NO-UNDO.

DEF FRAME
  f-main
  customer.custnum
  customer.name
  HEADER "CUSTOMER'S INFO PAGE" l-count.
 
OUTPUT TO "C:\rajat\abc.txt" PAGED.
FOR EACH CUSTOMER WITH FRAME f-main:
  DISPLAY custnum name WITH FRAME f-main NO-LABELS.
END.
OUTPUT CLOSE.

I am unable to figure out how to manipulate l-count variable. Can i apply a condition inside FOR EACH loop that if output is going towards the next page then increment value of l-count variable, please suggest.

Thanks & Regards!
Rajat.
 
Last edited:

Osborne

Active Member
In most cases the PAGE-NUMBER function does the job perfectly, and if you change your frame to something like the following you do not have to worry about setting a variable:
Code:
FORM HEADER
    customer.custnum
    customer.name
    "CUSTOMER'S INFO PAGE" PAGE-NUMBER
    WITH FRAME f-main PAGE-TOP CENTERED NO-BOX.
 
Top