User Tools

Site Tools


withprior_set_orphan_elimination_.htm
Navigation:  Language Reference > 9 -  Window and Report Attributes > Window and Report Attributes >====== WITHPRIOR (set orphan elimination) ====== Previous pageReturn to chapter overviewNext page

WITHPRIOR( [siblings] )

blk2blue.jpg

WITHPRIOR Specifies the structure is always printed on the same page as print structures PRINTed immediately preceding it.
siblings An integer constant or constant expression that specifies the number of preceding print structures to print on the same page. If omitted, the default value is one.

The WITHPRIOR attribute (PROP:WITHPRIOR) specifies that the DETAIL, or group HEADER or FOOTER structure (contained within a BREAK structure), is always printed on the same page as the specified number of print structures PRINTed immediately preceding it. This ensures that the structure is never printed on a page by itself, eliminating “orphan” print structures. An “orphan” print structure is defined as a group footer, or last detail item in a related group of items, that is printed on the following page separated from the rest of its related items.

The siblings parameter, if present, sets the number of preceding print structures that must be printed on the same page with the structure. To be counted, the preceding print structures must come from the same, or nested, BREAK structures. They must be related items. Any print structures not within the same, or nested, BREAK structures are printed, but not counted as part of the required number of siblings.

Example:

CustRpt  REPORT

Break1    BREAK(SomeVariable)

          HEADER

           !structure elements

          END

CustDetail DETAIL,WITHPRIOR()      !Always print with 1 sibling

           !structure elements

          END

          FOOTER,WITHPRIOR(2)     !Always print with 2 siblings

           !structure elements

          END

         END

        END

withprior_set_orphan_elimination_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1