This component generates a report based on a form specified by a Word, HTML, or PDF template. To create an instance of this component, in the Report Explorer, select File > New Form.
Use this component’s Report Output Type and Templates options to assign a form template to it. A form template specifies the fixed content of the report generated by this component and holes in the fixed content to fill with generated content. Assigning a form template populates this component with hole and page layout components representing the holes and page layouts of the form template.
You can set the properties of the layout components to override the template layout. You can also append content generation and control flow components to the hole components representing the report form holes.
To execute this component, select File > Report in the Report Explorer. Executing this component copies the associated form template’s fixed content to the output report, filling the holes in the fixed content with the content generated by the hole component’s children.
To set the defaults for these options, use the Report Generator preferences. For details, see Report Generation Preferences.
Report File Location Options
Use the Directory option to specify the folder in which to store the generated report file. Specify a folder to which you have write privileges.
The same folder as the report setup file
The current working folder
Use the Browse button to select from a list of directories.
You can use
%<VariableName> notation to specify a
folder in the Custom text box.
Report File Name
Use the Filename options to specify a file name for the report file.
The same file name as the report setup file
A file name different from the report setup file name
Enter the name of the report.
You can use
%<VariableName> notation to specify a
file name in the Custom text box.
Increment to Prevent Overwriting
To maintain the previous version of the setup file when you save updates to the setup file, select If report already exists, increment to prevent overwriting.
For HTML output, you can specify to generate the report packaging as zipped, unzipped, or both zipped and unzipped.
Report Output Format
Under Report Output Type and Templates, from the File format list, select the report output format. For form-based reports, you generate the report in the specified format using a template.
Select one of these options:
Direct PDF— Uses a PDF template.
HTML— Uses an HTML template and produces zipped or unzipped report packaging.
PDF (from Word)— Creates a Word document from a Word template and then generates a PDF document from the Word document.
Single-File HTML— Uses an HTML template and produces a single file.
Word— Uses a Word template.
To apply a template to this Report Form component, select a template from the list next to the File format list. The template list shows all templates on the MATLAB® path the first time you opened the Report Explorer. If you added a template to the MATLAB path after opening the Report Explorer for the first time, you must update the list. To update the list, execute this command:
When you select a template, the structure from the template populates the report setup.
The sections and holes (placeholders you can fill with content) defined in your template appear in the report setup.
Report Generation Processing
|View report after generation
When report generation finishes, the viewer associated with the report output format displays the report.
Linux® or Macintosh platform, the report generator calls the
To view the report manually, open the file from the location specified in the Report Options for the report, under Report File Location.
|Auto save before generation
Save the report setup file before you generate a report.
|Compile model to report on compiled information
Ensure that a report reflects compiled values.
By default, the Simulink® Report Generator™ reports uncompiled values of Simulink parameters. The uncompiled values of some parameters, such as signal data types, can differ from the compiled values used during simulation.
This option causes the report generator to compile a model before reporting on model parameters. After generating the report, the report generator returns the model to its uncompiled state.
When you select this option, whenever report generation requires simulating the model (for example, the report includes a Model Simulation (Simulink Report Generator) component), the report generator uncompiles the model and then recompiles the model, if necessary, to report on model contents. If a report requires multiple compilations, the processing can be time-consuming.
To minimize compilations, consider using separate reports to report on the contents of a model and on the results of simulating that model.
|Generate DocBook only
|Generate a DocBook XML file and do not generate the Word, PDF, or HTML report.
|Evaluate this string after generation
Specify MATLAB code for processing to occur after the report is generated. For example, you can specify to close a model.
To record notes and comments about your report setup, use the Report Description box.