MATLAB: Does a nested report file differ in format when built MATLAB Report Generator 1.3 (R13SP1) and 2.3.1 (R14SP3)

-setupgeneratorMATLAB Report Generatorreportsubsectiontitle

When I build my report file in MATLAB Report Generator 1.3 (R13SP1), I obtain an RTF document that has chapters and sections. When I build the same report in MATLAB Report Generator 2.3.1 (R14SP3), The same headings appear in subsections and sub-subsections instead of chapters and sections.

Best Answer

  • This is expected behavior.
    The issue is due to how MATLAB Report Generator 2.x creates chapters and subsections. If the report setup file does not explicitly define chapter components, then it assumes that the entire report is contained in a "Section 1". All of the sections nested in "Section 1" become sub-sections, which explains the difference in text and paragraph formatting.
    To work around this issue, perform the following steps:
    1. Open test_format_stub.rft in MATLAB Report Generator 2.3.1 (R14SP3).
    2. Right-Click on "Report - test_format_stub.rpt" and select Send to Workspace.
    3. Enter the following in the MATLAB Command Window:
    ans.SectionType = 'book'
    4. In order to preserve this change, save the file. Note that this format is not recognized by the older MATLAB Report Generator 1.3 (R13SP1), you should use file menu option 'Save As...' to create a new file name.