User`s guide

Use Subforms in a Report
13-31
Use Subforms in a Report
A document part is a form that you can add to a document or to another document part.
Document parts simplify generation of sections of a report that have the same form, such
as sections that report on the results of a series of tests or the performance of a series of
financial portfolios. Use a similar approach as you do for main document forms.
1
Create a template that defines the form of the document part.
2
For each section:
a
Create an mlreportgen.dom.DocumentPart object.
b
Fill in the holes.
c
Append the part to the main document.
For an example of a report that uses subforms, open the Functional Report example.
Tip The DOM API allows you to store the templates for document parts in the main
template for a report. This allows you to use a single template file to supply all the
templates required for a report. For details, see “Create Document Part Template
Libraries” on page 13-33.
See Also
Functions
mlreportgen.dom.Document.moveToNextHole
Classes
mlreportgen.dom.DocumentPart
Related Examples
“Fill the Blanks in a Report Form” on page 13-29
“Create a Microsoft Word Template” on page 13-111
“Add Holes in a Microsoft Word Template” on page 13-112
“Create an HTML Template” on page 13-122
“Add Holes in an HTML Template” on page 13-124