User`s guide
13 Create a Report Program
13-122
Create an HTML Template
Use one of these approaches to create an HTML template for generating a report.
• Use mlreportgen.dom.Document.createTemplate to create a copy of the DOM
API default HTML template that you can then customize. For example:
mlreportgen.dom.Document.createTemplate('mytemplate','html');
• Use an existing HTML template (for example, a report template for your
organization) and customize the template to use with the DOM API.
• Create an HTML template from scratch.
Edit a Zipped HTML Template
To edit a zipped HTML template, unzip it into a subfolder of the current folder, using the
unzipTemplate function. For example, to unzip files for a template called mytemplate:
unzipTemplate('mytemplate')
To repackage a template after you edit it, use the zipTemplate function. For example,
to package the mytemplate.htmx template in a subfolder called mytemplate, in the
current folder:
zipTemplate('mytemplate.htmtx')
If you do not want to use the current folder, you can specify a path with the
unzipTemplate and zipTemplate functions.
See Also
Functions
unzipTemplate | zipTemplate
Classes
mlreportgen.dom.Document
Related Examples
• “Add Holes in an HTML Template” on page 13-124
• “Modify Styles in an HTML Template” on page 13-127