Printing Data on First and Last Pages of a Form

When a forms generation statement includes data from MultiValued attributes, the forms may occupy more than a single page. In this case, use the @F, @L, and @M print codes to customize the forms.

If a forms generation statement references one or more MultiValued attributes, the @F code outputs data on only the first page of each multipage form, and the @L code outputs data on only the last page of each multipage form. The remaining pages contain a blank space at the position defined for the @F- or @L-formatted attribute. If each form occupies only a single page (that is, if the data for the MultiValued attributes fits in the defined window space), the @F and @L codes function just like the @A code, displaying the data at the specified position on each form.

If a form contains no MultiValued attributes (and therefore occupies only one page), the @F and @L codes also function just like the @A code.

The @M code outputs text on all but the last page of a multipage form, and then outputs the corresponding attribute at the same position on the last page. The @M code is useful for printing continuation messages (for example, SEE LAST PAGE or CONTINUED ON NEXT PAGE) on every page but the last and then printing the data for an attribute (such as a total) on the final page of a form. Like the @F and @L codes, the @M code behaves like an @A code if a form occupies only one physical page. In this case, the literal text is ignored and the data for the @M-formatted attribute is printed at the specified position.

This example reflects the use of these three print codes:

>FORMS ORDERS @F(5,2):FULL-NAME @F(5,3):STREET @F(5,4):CITY @F(18,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):AMOUNT @L(20,20):TAX @M(20,22,"SEE LAST PAGE"):TOTAL.AMT HEADING " 'C' ORDER REPORT"

The illustration below shows the first page of a multipage form created with the preceding forms generation statement.

The illustration below shows the second page of the same form.

The illustration below shows a single-page form created with the same statement.

See Also

Including MultiValued Attributes on Forms

Designing Windows

Numbering Pages on Multipage Forms