This is machine translation

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

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.



Get base table title reporter


reporter = getTitleReporter(table)


reporter = getTitleReporter(table) returns a reporter that the 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

expand all

Table for the report, specified as a base table reporter object. To create the table input, use

Output Arguments

expand all

Base table title reporter, returned as a reporter object.


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:

  1. Create a copy of the PDF template of the reporter using the createTemplate method of the BaseTable reporter. Name the copy MyTableTemplate.pdftx and store it in the report folder.

  2. Unzip the template.

  3. Open the style sheet file of the template in a text editor.

  4. Edit the BaseTableTitle style in the style sheet file of the template so it meets your requirements.

  5. Save the style sheet file.

  6. Rezip the template.

Then, use the getTitleReporter method and the TemplateSrc property to use your template.


import mlreportgen.dom.*
rpt = Report('MyReport','pdf');
table = BaseTable();
table.Title = 'My Table';
titleReporter = getTitleReporter(table);
titleReporter.TemplateSrc = 'MyTableTemplate.pdftx';
table.Title = titleReporter;

Introduced in R2017b