|Navigation: Language Reference > 9 - Window and Report Attributes > Window and Report Attributes >====== WITHPRIOR (set orphan elimination) ======|
WITHPRIOR( [siblings] )
|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.
CustDetail DETAIL,WITHPRIOR() !Always print with 1 sibling
FOOTER,WITHPRIOR(2) !Always print with 2 siblings