Templates
Use Word, HTML, and PDF templates to format reports
Templates specify the default formatting and fixed content for a report. Templates can also contain holes (blanks) that your report program can fill with dynamic content. Report viewers, such as Microsoft® Word or Adobe® Acrobat®, apply the format specifications to format the report.
Classes
mlreportgen.dom.Template | Create report template object |
mlreportgen.dom.TemplateDocumentPart | Create template for document part (Since R2023b) |
mlreportgen.dom.TemplateHole | Hole to append to template |
mlreportgen.report.InlineContent | Fill inline content hole reporter |
mlreportgen.report.BlockContent | Fill block content hole reporter |
mlreportgen.report.SectionTitle | Generate a section title |
mlreportgen.report.Title | Fill title hole reporter |
Functions
zipTemplate | Package DOM HTML and PDF template in zip file |
unzipTemplate | Unzip zipped DOM template |
zipDOCXTemplate | Package unzipped DOTX template into DOTX file |
unzipDOCXTemplate | Unzip zipped DOTX template file |
Examples and How To
Microsoft Word Templates
- Create Microsoft Word Templates
Get an overview of ways to create a Word template for a report. - Add Holes in Microsoft Word Templates
Add holes for dynamic content to Word report templates. - Modify Styles in Microsoft Word Templates
Edit styles that control formatting for Word reports.
HTML and PDF Templates
- Create HTML and PDF Templates
Get an overview of ways to create an HTML or PDF template for a report. - Create HTML Document Part Template Library
Create HTML document part templates to define fixed content and holes for dynamic content. - Modify Styles in HTML Templates
Edit styles that control formatting in HTML reports. - Create PDF Document Part Template Library
Create PDF document part templates to define fixed content and holes for dynamic content. - Modify Styles in PDF Templates
Edit styles that control formatting in PDF reports. - Add Holes in HTML and PDF Templates
Add holes for generated content to an HTML or PDF template. - PDF and HTML Document Parts and Holes
Define document parts and document holes for PDF and HTML reports.
Concepts
- Open Template Files
How to open template files.
- Reporter Templates
Default Report API reporter templates for Word, PDF, and HTML output.
- Templates for DOM API Report Programs
Templates provide default formatting for DOM API reports.