getTitleReporter
Class: mlreportgen.report.BaseTable
Namespace: mlreportgen.report
Get base table title reporter
Syntax
reporter = getTitleReporter(table)
Description
returns a reporter that the reporter
= getTitleReporter(table
)BaseTable
reporter
(table
) uses to format the value specified by its
Title
property. Use getTitleReporter
to
customize the title alignment, position, and appearance.
Input Arguments
Output Arguments
Examples
Use Customized Table Title Style
Create a style for the title of your table that differs from the default style.
First, create a custom BaseTable
template using these steps:
Create a copy of the PDF template of the reporter using the
createTemplate
method of theBaseTable
reporter. Name the copyMyTableTemplate.pdftx
and store it in the report folder.Unzip the template.
Open the style sheet file of the template in a text editor.
Edit the
BaseTableTitle
style in the style sheet file of the template so it meets your requirements.Save the style sheet file.
Rezip the template.
Then, use the getTitleReporter
method and the
TemplateSrc
property to use your template.
import mlreportgen.report.* import mlreportgen.dom.* rpt = Report('MyReport','pdf'); table = BaseTable(); table.Title = 'My Table'; titleReporter = getTitleReporter(table); titleReporter.TemplateSrc = 'MyTableTemplate.pdftx'; table.Title = titleReporter;
Version History
Introduced in R2017b