Use Subforms in Reports
A document part is a form that you can add to a document or to another document part. Document parts simplify generating 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.
Create a template that defines the form of the document part.
For each section:
Create an
mlreportgen.dom.DocumentPart
object.Fill in the holes.
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 capability allows you to use a single template file to supply all the templates required for a report. For details, see Create Microsoft Word Document Part Template Library.
See Also
Functions
Classes
Related Examples
- Fill Report Form Blanks
- Create Microsoft Word Templates
- Add Holes in Microsoft Word Templates
- Create HTML and PDF Templates
- Add Holes in HTML and PDF Templates