This example shows you how to use Simulink® Report Generator™ to customize a System Design Description report for a model. The default version of the report provides information about a system design represented by a Simulink model. You can adapt the report to meet your needs.
This example shows you how to customize a report called System Design Description. The Simulink Report Generator product creates a default version of this report automatically from a Simulink model that you choose. However, you can generate a customized version of this report -- for example, to adhere to your organization's documentation standards. This demonstration shows you how to customize the report by adding an abstract that follows the title page.
You can customize the System Design Description for the Simulink example model,
sldemo_autotrans, which represents an automotive drivetrain. To open the example model, run the following command:
Open the System Design Description Dialog Box
From the Simulink model File menu, select Reports > System Design Description.
The System Design Description dialog box opens.
Open the Template in Report Explorer
In the System Design Description dialog box, click the Customize button.
Simulink Report Generator creates a copy of the System Design Description report template,
SDD_custom.rpt, to customize. Templates specify how the Simulink Report Generator software produces reports from a model. You create, view, and modify report templates in a graphical user interface called Report Explorer.
Edit the Report Template
When generating a default version of the System Design Description report, you specify several report options using the System Design Description dialog box. When customizing the report, you must specify these options independently of the dialog box. You can set customized options either graphically, using the Report Explorer, or programmatically, using MATLAB commands. This example demonstrates a graphical approach.
In the left-hand pane of the Report Explorer, select the
SDD_custom.rpt node. The right-hand pane displays report options for the template. Specify a value for the following report options.
File format: Web (HTML)
If report already exists, increment to prevent overwriting: On
You also see other options from the System Design Description dialog box associated with the
Title Page component.
Edit the Title Page Component
Report templates contain a collection of components that specify the structure and content of a report. The left-hand pane of the Report Explorer lists a hierarchy of components that comprise the
SDD_custom.rpt template. Each component offers several properties whose values you specify to control a particular aspect of the report generation process. The right-hand pane of Report Explorer displays properties for a component that you select in the hierarchy pane.
SDD_custom.rpt template includes a
Title Page component that provides several options associated with the System Design Description dialog box. In Report Explorer, from the hierarchy pane, select the
Title Page component and specify a value for the following properties.
Main > Title: sldemo_autotrans
Main > Subtitle: Design Description
Main > Custom author: Zaphod Beeblebrox
Image > File name: C:\images\corporate_logo.gif
Legal Notice > Legal Notice Text: For Internal Distribution Only
Add Abstract via Title Page Component
You can also add an abstract to a report using the
Title Page component. In Report Explorer, from the hierarchy pane, select the
Title Page component; in the properties pane, select the Abstract tab and in the Abstract Text field, enter:
Simulink(R) is used to model an automotive drivetrain. Stateflow(R) enhances the Simulink model with its representation of the transmission control logic. Simulink provides a powerful environment for the modeling and simulation of dynamic systems and processes. In many systems, though, supervisory functions like changing modes or invoking new gain schedules must respond to events that may occur and conditions that develop over time. As a result, the environment requires a language capable of managing these multiple modes and developing conditions. Stateflow demonstrates its strength in this capacity by performing the function of gear selection in an automatic transmission.
Generate the Report
In the Report Explorer toolbar, click the Report button. When the report is complete, an application associated with the specified report format displays the customized System Design Description.
Save the Template
From the Report Explorer File menu, select Save As. Specify a location and a file name for your custom report template. By saving a custom template, you can access and reuse it. For instance, you can apply the custom template to other Simulink models to create reports that have the same structure and format.
For more information about Report Explorer, refer to What Is the Report Explorer?What Is the Report Explorer? in the Simulink Report Generator documentation. To learn more about the properties of the
Title Page component, see its reference pagereference page in the MATLAB Report Generator documentation.