Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Create Report Templates

Create templates to use with programmatic reports

Functions

mlreportgen.report.Report.createTemplateCreate report template
mlreportgen.dom.Document.createTemplateCreate DOM template file
mlreportgen.dom.Document.packageAdd OPC part files to document package
mlreportgen.dom.Document.getImageDirectoryGet image folder of document
zipTemplatePackage DOM HTML and PDF template in zip file
unzipTemplateUnzip zipped DOM template

Classes

mlreportgen.dom.TemplateCreate report template object for Word or HTML
mlreportgen.dom.TemplateHoleHole to append to template

Examples and How To

Microsoft Word Templates for Programmatic Reports

Create a Microsoft Word Template

Use one of these approaches to create a Word template for generating a report.

Add Holes in a Microsoft Word Template

Word for Mac does not support creating holes for DOM API templates.

Modify Styles in a Microsoft Word Template

You can modify or add format styles in a Word template.

HTML and PDF Templates for Programmatic Reports

Create an HTML or PDF Template

Use one of these approaches to create an HTML or PDF template for generating a report.

Create an HTML Document Part Template Library

In the default template package, the file docpart_templates.html defines the library and some default document part templates.

Modify Styles in HTML Templates

You can customize or add format styles in the CSS files in your HTML template.

Create a PDF Document Part Template Library

In the default template package, the file docpart_templates.html defines the library and some default document part templates.

Modify Styles in PDF Templates

You can customize or add format styles in your PDF template using this workflow.

Add Holes in HTML and PDF Templates

Template holes are places in a template that a report program fills with generated content, supporting a form-based report.

PDF and HTML Document Parts and Holes

This example shows how to:This example uses a PDF template and report.

Concepts

Templates for DOM API Report Programs

Templates that provide default formatting for DOM API reports

Was this topic helpful?