Numbering Pages on Multipage Forms

On single-page forms, page numbering is consecutive: the first page (form) is Page 1, the second is Page 2, etc.

Default page numbering on multipage forms works the same way: all pages produced by a forms generation statement are numbered consecutively. When working with multipage forms, to number each form separately include the Z option in a forms generation statement. The Z option causes the system to reset the page number in a footing back to 1 on the first page of each multipage form. The Z option is used in combination with the FOOTING modifier. For example:

>FORMS ORDERS @F(5,2):FULL-NAME @F(5,3):STREET @F(5,4):CITY @F(8,4):STATE @(20,6):ORDER.ID @(20,7):CUST.ID @W(5,10,12):SHORT.TITLE @W(17,10,12):QTY @W(22,10,12):LINE.AMT @(42,10):DATE @L(20,19):TOTAL.AMT @L(20,20):TAX @M(20,22,"SEE LAST PAGE"):TOTAL.ORDER HEADING " 'C' ORDER REPORT" FOOTING "PAGE 'P' " (Z)

The illustration below shows using the Z option to reset the page number to 1 on the first page of each multipage form.

The illustration below shows the last page of a multipage form generated with the Z option and the FOOTING modifier.

Since the Z option does not affect page numbers in headings, the HDR-SUPP modifier should also be included in the forms generation statement, or (as in this case) a heading that does not include a page number should be specified with the HEADING modifier. This prevents two incompatible page numbers from appearing on each page of a form.

See Also

Including MultiValued Attributes on Forms

Designing Windows

Printing Data on First and Last Pages of a Form