mlreportgen.report.RptFile Class
Namespace: mlreportgen.report
Superclasses: mlreportgen.report.Reporter
Create Report Explorer-based reporter
Description
Use the RptFile reporter to include the content generated by a Report
Explorer setup (.rpt) file in a Report API report. When added to a report,
the RptFile reporter:
Executes the specified Report Explorer setup file to generate a DocBook XML rendition of the Report Explorer report
Uses a modified version of the Report Explorer Docbook-to-DOM conversion template to convert the XML to a set of DOM objects (see Manage Report Conversion Templates)
Adds the DOM content to the Report API report.
The mlreportgen.report.RptFile class is a handle class.
Creation
Description
reporter = RptFile creates an empty Report Explorer-based
RptFile reporter. Before adding the reporter to a report, your report
program must set the reporter's SetupFile property to the path of a
Report Explorer setup (.rpt) file. Otherwise, an error occurs.
By default the RptFile reporter uses a conversion template that is a
slightly modified version of the Report Explorer's default conversion template for the
report output type. For example, if the report output type is PDF, the reporter uses a
slightly modified version of the default template for the Report Explorer's
PDF (from template) output type.
You can use a custom conversion template to customize the reporter output. Use the
reporter's mlreportgen.report.RptFile.createTemplate method to create a copy of one of the
reporter's default output-type-specific conversion templates for customization. To use the
customized template, set the RptFile reporter's
TemplateSrc property to the path of the customized template.
reporter = RptFile(SetupFile) creates a RptFile
reporter based on the specified Report Explorer setup file (.rpt file).
See the SetupFile
property.
sets properties using name-value arguments. You can specify multiple name-value arguments
in any order.reporter = RptFile(PropertyName=Value)
Properties
Methods
Examples
Version History
Introduced in R2019a

