Because the length of a form
that has a flexible layout varies depending on the amount of data
merged with the form, forms that have a flexible layout are often longer
than one page. Using overflow leader and overflow trailer subforms
is an effective way to start and finish subforms that repeat over
multiple pages. You can use any subform that is configured to position
content as an overflow leader or trailer. For example, in the Purchase
Order sample form, the detail subform is configured to position
content and repeat for every data item. When the form is merged
with data, if the first page has insufficient space to display all
occurrences of the detail subform, a new page is added and the data
continues to flow into the next content area.
When data flows this way across multiple pages, you may want
to carry forward onto each new page certain text such as “Continued
from previous page” or specific formatting elements such as a column
header row that includes the descriptive labels for each column
of data. Using column header rows on each subsequent page makes
the resulting form much easier for users to follow. To do this,
you can create an overflow leader subform that will act as the column header
row for each additional page. In the Purchase Order sample form,
for example, the detailHeader subform is selected as the overflow
leader. As a result, a copy of the detailHeader subform is rendered
at the top of every new page before the first occurrence of the
detail subform.
Similarly, you may want to include information following the
last occurrence of the repeating subform, at the bottom of all pages
except the last page. For example, you may want to include text
such as “Continued on next page” at the bottom of these intervening
pages. To do this, you can create an overflow trailer subform for
the repeating subform in the same way that you created an overflow leader
subform.
When a subform
overflows to the new page, the server performs these operations:
Places the overflow trailer on the current page
Places the overflow leader on the next page
Flows the expanding subform and the remainder of its repeating
objects onto the new page
An overflow leader is a special type of positioned subform
that appears at the top of the next page whenever a page overflow
occurs.
Overflow leaders are similar to the heading row in a standard
table. The heading row appears at the top of the table and contains
a descriptive label for each of the columns in the table. You can
format the table so that when it expands beyond one page, the heading
row is repeated at the top of the new page. This makes the information
in the table easier to understand as the reader moves from page
to page.
An overflow leader subform behaves in a similar way. When you
specify that a specific subform will be the overflow leader for
a subform that repeats, the overflow leader subform will appear
once before the repeating subform at the top of the current page
and each subsequent page thereafter.
The repeating subform is added as many times as necessary when
merged with data. When there is no more room on the first page,
a new page is added and the data continues to flow into the next
page until all the data is consumed. The overflow leader subform
will appear once at the top of each page.
You can see an example of how an overflow leader subform is used
in the sample form design whose layout adjusts to accommodate data
that is included with Designer. The sample, Purchase Order.xdp,
is in the Samples folder where Designer is installed on your system.
In that example, the subform named detailHeader acts as the overflow
leader for the repeating subform named detail.
Bookend leaders are subforms that appear before a repeating subform.
If you define a subform sibling just above a repeating subform and
then specify it as an overflow leader, you have defined it as a
bookend leader and as an overflow leader.
An overflow trailer appears at the bottom of the next page whenever
a page overflow occurs. Use an overflow trailer to include information
that appears only once, after all the data is positioned.
Bookend trailers are subforms that appear just below a repeating
subform. If you define a subform just below a repeating subform
and then specify it as an overflow trailer, you have defined it
as a bookend trailer and as an overflow trailer.