You can append HTML markup or the contents of a whole HTML file to a programmatic report written with the Document Object Model (DOM) API to:
Convert an existing HTML report to a Microsoft® Word or PDF report.
You can append the HTML markup for a report to a DOM report,
which you can then generate in Word or PDF format. For example, you
can use a MATLAB®
printf statement to generate
an HTML report file, and then append that HTML file to a DOM report
to generate a PDF or Word version of the report. Another example is
to convert a report generated by Model Advisor from HTML to Word or
Add content based on HTML markup.
You can append the HTML code for a report to a DOM report, using the HTML code as a building block in a DOM report that includes other report elements.
Perform these steps to append HTML to a DOM report.
Ensure that the HTML code complies with HTML standards,
such as including beginning and end tags (for example,
Consider using a utility such as HTML Tidy.
In a DOM report, use
append HTML code or
addHTMLFile to append an HTML
file to a document or document part.
For example, this DOM code creates a Word report that displays
World, based on the HTML code that you append to the report.
import mlreportgen.com.*; d = Document('MyReport','docx'); addHTML(d,'<p style="color:blue"><b>Hello World</b></p>');
To simplify display of an HTML report, you can specify that the DOM API generate the report as a single HTML file that includes the report images.
'html-file' for the
argument for a
For details, see the
mlreportgen.dom.Document reference page.
In R2015a, the DOM API includes several enhancements to simplify creating and formatting tables.
You can use an
object in the
Style property for
ResizeToFitContents to specifies whether to
whether to resize columns to fit the widest content in a column.
You can specify an
object in the
Style property of an
The height of a row is the tallest height specified for a table entry
in that row. If no entries in the row specify a height, then the row
height is specified by the
Height property of the
Table entries can now inherit the border formatting
specified in a
TableEntriesStyle property of
You can use the
to create high-level HTML elements not otherwise supported by the
DOM API, such as
You can also use a
Container object to simulate
format inheritance in Word reports.
For details, see
You can use the MATLAB Function component property Include function symbol data to generate a table with MATLAB function symbol data. The table includes information on the user-defined and (optionally) built-in MATLAB variables and functions invoked by the MATLAB function that computes the block outputs.
You can append text and images to
For details, see
You can use the DOM (Document Object Model) API to create MATLAB programs to generate reports. The DOM API provides a set of objects for creating text, paragraphs, tables, images, lists, and other kinds of report content. When you create a report program, you can:
Produce Microsoft Word, HTML, and PDF output using the same code.
Specify formatting for report objects, such as color and bold for text objects.
Use format objects (for example,
to format report objects.
Add MATLAB data directly to report objects (for
char array to a
Use formatting and fixed content that is defined in a Word or HTML template.
Create form–based reports that contain fixed and generated content.
Modularize a report into parts for generation of reports that have repetitive elements of the same format.
For information about how to create report programs, see Document Object Model.
Generate template-driven reports much faster than in previous releases, without using Java memory.
To take advantage of these performance advantages, use one of these File format report options:
HTML (from template)
PDF (from template)
Word (from template)
For details, see Report Generation Using Templates.
You can use the DOM (Document Object Model) report objects in a MATLAB program along with Word and HTML fill-in-the-blanks templates that contain fixed and holes to include generated content. The report program uses report objects to generate the variable information. See Form-Based Reporting.
You can now change and save your diff color preferences for the MATLAB Comparison Tool. Apply your color preferences when comparing model files, text files, MAT-files, variables, or zip files or folders.
For details, see Change Color Preferences.
If you have Simulink® Verification and Validation™ installed, you can include model coverage and requirements information in a Web view. In the Web View dialog box, open the Optional Views tab and select Model Coverage or Requirements or both.
To view the model coverage or requirements optional Web view information in a Web view, you must have Simulink Verification and Validation installed. To view the information, in the Web view click a highlighted block (for example, blocks with an orange border have requirements information). The information for that block appears in the Informer pane below the model.
For more information, see Optional Web Views.
When you use
codegen.rpt to create code generation
reports with Simulink Report Generator™, in the Report Options dialog
box on the Properties pane, the Compile
model to report on compiled information check box is selected
by default. With this option, the software updates a model only once
when creating the report. You get much faster report generation, especially
for models with many atomic subsystems.
When exploring a Web view, you can view click a block or signal to view block parameter and signal property values in a separate pane. For details, see View Block Parameters and Signal Properties.
Specify the file name and folder to use for storing the exported Web view. You can also specify whether to package the Web view files a zip file, in a folder, or in both a zip file and a folder. For details, see Web View Files.
The Web View export dialog box has been enhanced to make it easier to specify export options. To get detailed information about an option, right-click the option and select "What's This?" For details, see Export Models to Web View Files.
which you can use to export a Web view, includes an option for specifying
whether to export MathWorks® built-in library blocks.
The interface for whether to export masked subsystems has been simplified.
The default for the
has been changed to
The syntax for specifying whether to export masked subsystems
has been simplified. The following argument values relating to masked
subsystems are supported for compatibility with releases before R2014a.
|Previous 'LookUnderMasks' Argument Value||Meaning|
From the XML comparison report, you can compare the contents of MATLAB Function blocks. You can now merge selected changes in the block code. This enables you to merge changes made by developers in different parts of the MATLAB Function block code without leaving the Simulink environment.
In the XML comparison report of the parent model, click Compare next to the MATLAB Function block to open a new text comparison report showing the differences in the code inside the blocks. Use the merge controls on the Comparison tab to merge selected differences.
For details, see Merge Simulink Models from the Comparison Report.
You can view a Web view of a protected model. For details, see Protected Web View.
The Comparison Tool is redesigned for more efficient workflow and access to tools. The toolstrip contains components that were previously available in menus and toolbars. Tools are unified across different comparison types such as text, MAT, variable, and Simulink XML, to make it easier to find controls for displaying, filtering, and navigating differences.
For details, see Explore the XML Comparison Report for Simulink Models.
Snapshot component, in addition to inserting images
of the Simulink library Scope and XY Graph blocks, now supports:
Spectrum Analyzer and Time Scope blocks (DSP System Toolbox™)
Video Viewer (Computer Vision System Toolbox™)
Blocks in the Simulink Control Design™ Linear Analysis Plots library (for example, the Bode Plot block)
The System Design Description dialog box provides an option for you to include or exclude model references from a System Design Description report. Prior to R2012b, model references were always included. In R2012b, by default reports include model references, but you can choose to exclude them.
R2012b provides enhanced Stateflow® reporting capabilities for Simulink functions:
The System Loop component provides an option to exclude from a report a subsystem that implements a Simulink function.
The new Simulink Function System Loop component provides information on the function-call subsystem hierarchy that implements a Simulink function.
In R2012a, you can view changes in Configuration Parameters dialog box options in the Simulink XML Comparison report.
After comparing XML text files exported from Simulink models, you can use the report to explore differences in the Configuration Parameters. Click report items to view changed options in the Parameters pane of the report. The Parameters pane displays the label text from the dialog controls and the parameter values. If you have reverse annotation on, the report also displays the appropriate root node pane of both Configuration Parameters dialog boxes.
For details, see Display Items in Original Models in the Simulink Report Generator User's Guide.
In R2012a, the printable XML Comparison report has improved speed and filtered results. If you set filters, you can now create a printable report containing the filtered results only.
For details, see Filter Out Differences in the Simulink Report Generator User's Guide.
You can use the new Custom filtering MATLAB code property
Filter component to extend the system filtering
criteria beyond the existing System Filter properties (for example,
the Report only if system has at least N blocks property).
You can define a filter for selecting the variable properties
Workspace Variable component displays. You can
choose from a set of properties for a class, or you can define a custom MATLAB function
to specify a filter.
You can now merge Simulink models from the XML text comparison report. You can merge individual parameters, blocks, or entire subsystems. This feature enables you to merge two versions of a design modeled in Simulink.
You can merge from the left (or base) model to the right (or edited) model using the XML text files. If necessary, you can swap sides. Click Undo to revert all merge operations.
For details, see Merge Simulink Models From the Comparison Report in the Simulink Report Generator User's Guide.
You can now export XML comparison results to the MATLAB base workspace. You can use the results data for tasks such as further analysis or incorporating into different reports.
For details, see Export Results to the Workspace in the Simulink Report Generator User's Guide.
Function component inserts information about MATLAB
Function blocks into a report.
Configuration Set component inserts the active
configuration set of a model into a report.
The System Design Description report, which you can generate from the Simulink Model Editor, includes additional information about these elements of a model:
Simulink workspace variables
MATLAB Function blocks
The System Design Description dialog box includes a new stylesheet option, for specifying the report output format. Customizing the System Design Description report is simpler.
For details, see Generate System Design Description Reports.
Point Summary Table,
Summary Table, and
Summary Table components, use the new Transpose
table check box to change the summary table rows into columns
in the generated report. Specifying this option puts the property
names in the first column and the values in the other columns.
Reports for comparisons of XML files exported from Simulink models have a new faster user interface, with changed parameters displayed in a separate panel for easier review. The enhanced report now has color highlighting for new and changed items. The report provides additional filter options, allowing you to filter categories of changes, such as nonfunctional changes (such as position or font), line changes, and changes in block parameter defaults.
For details, see Explore the XML Comparison Report in the Simulink Report Generator User's Guide.
The Model Loop component has a new Model Reference option for automatically reporting on referenced models.
Comparisons of XML files exported from Simulink models with the same name now only contain information about user changes to the files. In previous releases, the comparison process introduced confusing artificial changes to both files, such as file name changes. Comparing the XML exported from two versions of the same file is a common workflow when using Configuration Management tools. The XML comparison now produces better results for this workflow.
From the Simulink Model Editor, you can access a new System Design Description report. The report provides summary or detailed information about the system design represented by a model. You can specify report options using the report dialog box, or you can create a customized version of the report using the Report Explorer. For details, see Generate System Design Description Reports.
For looping components, you can sort blocks based on how the
blocks are arranged in the model or chart. The two new sort
blocks options are:
By layout (left to right) and
layout (top to bottom). These options reflect the model
or chart layout horizontally across rows or vertically down columns.
The components with these new block sorting options are:
The new Compile model to report on compiled information report output option ensures that a report reflects compiled values for Simulink parameters. For details, see Report Explorer Report Options in the Simulink Report Generator documentation.
New components that support the Requirements Management Interface are:
Missing Requirements Block Loop — Apply all child components to blocks that do not have requirements
Missing Requirements System Loop — Loop only on systems and subsystems that do not have associated requirements
Requirements Documents Table — Insert table of linked requirements documents
Requirements Signal Loop — Run child components for each signal with requirements in current system, model, or block
The Simulink Summary Table component now reports additional information about Goto and From blocks.
For Goto block properties, the new columns are:
From Blk — Name of the From block connected to the Goto block; this name links to that block's properties information in the report
From Blk Location — Path to From block location in the model
For From block properties, the new columns are:
Goto Blk Name — Name of the Goto block connected to the From block; this name links to that block's properties information in the report
Goto Blk Location — Path to Goto block location in the model
If a Goto or From block is not connected to a corresponding From or Goto block, you see "Unconnected" in the Goto or From block name and location columns.
To provide better graphics quality in reports using the Word document format or RTF (Rich Text format) on Windows® platforms, the default format for Handle Graphics®, Simulink, and Stateflow images is now Windows metafile format (the default was black and white TIFF).
You can control the image format using the MATLAB preferences or the Simulink Report Generator Preferences, or from snapshot components such as the Axes Snapshot component.
To change the image format back to the previous default of black and white TIFF, change the preferences.
The MATLAB/Toolbox Version Number component now supports options to display information based on whether a Simulink model or Stateflow chart requires a MathWorks product.
For Simulink data object variables, in the Block Summary table, the block variables column (third column) now provides a link from the variable name to the Simulink Functions and Variables table row for that variable. The Model Variables table includes information about the data object, such as the data type and the minimum and maximum values.
The Image file format options for these components no longer include Adobe® Illustrator:
Stateflow Dialog Snapshot
To Workspace Plot
If you wish to integrate a Simulink Report Generator image into Adobe Illustrator, specify a image file format supported by Adobe Illustrator, such as PDF, and then open the image file in Adobe Illustrator.
The XML comparison report has new navigation controls to step through differences in the report. You can use the toolbar buttons or the XML menu to move to the next or previous group of changes. As you step through selected changes in the report, Simulink Report Generator can highlight the corresponding items in the original models.
Other usability improvements in the report include:
Enhanced XML comparison algorithm with reduced memory consumption
Improved matching results for many types of Simulink blocks and Stateflow elements
Ability to filter out nonfunctional differences in the comparison result
Simplified toolbar and XML menu
For details, see Explore the XML Comparison Report in the Simulink Report Generator User's Guide.
New comparison report for pairs of XML files, including an option to compare XML files exported from Simulink models.
XML comparison report can display highlighted results in the original models.
For details, see Comparing XML Files Exported from Simulink Models in the Simulink Report Generator documentation.
Web views support Stateflow MATLAB Function blocks, enabling the display of Stateflow MATLAB Function block code in Web views.
The Simulink Report Generator software now loads only visible systems into Web views, resulting in a faster viewing experience for Web views of large Simulink models.
Clicking the Show All Layers button
in a Web view now displays all layers as thumbnail images in
resulting in faster loading of the
Show All Layers view.
You can now export information contained in DocBlock blocks from Simulink models to Web views.
For more information on DocBlock blocks, see the
page in the Simulink documentation.
You can now specify the MATLAB
in the format:
For more information about specifying functions in annotations, see Annotation Callback Functions in the Simulink documentation.
You can place your cursor over a MATLAB Function block in a Web view to display the MATLAB code contained in the block.
For more information on MATLAB Function blocks, see the
Function reference page in the Simulink documentation.
Support for hierarchical Web view navigation, which provides you with:
Easy navigation through layers of your Web view
Visual indications of what context you are in when you navigate through your Web view
Two new components report on code generated by the Real-Time Workshop® product:
Produces version information, a list of the generated files, code generation configuration information, and, if the model includes subsystems, a subsystem map.
Imports source and header (include) files generated by Simulink Coder™ software. Also imports custom files you specify as part of your model.
You can now create a Web view of a Simulink model or Stateflow chart. A Web view is an interactive rendition of the model or chart that you can view in a Web browser. A Web view uses Scalable Vector Graphics (SVG) to render and navigate a model.
Creating a Web view requires the Simulink Report Generator product. Using a Web view in a Web browser requires SVG support in the browser, implemented natively or through a plug-in, but it does not require MathWorks products to be installed.
Because they require only Web browsers with widely available SVG support, Web views are useful for presenting models to audiences and for sharing models with colleagues who do not have MathWorks products installed.
For details, see Export Simulink Models to Web Views in the Simulink Report Generator documentation.
Web views in V3.0 (R2006a) are supported only in these Web browsers:
Firefox Version 1.5 or later, which has native support
for Scalable Vector Graphics (SVG). To obtain the Firefox browser,
Microsoft Internet Explorer® with the Adobe SVG
Viewer plug-in. To obtain the SVG Viewer plug-in, visit
Web views have these limitations in Firefox:
There is no shortcut menu.
When you move the mouse over exported systems and diagrams, they are not highlighted, but the cursor changes.
Fonts may be too large in some circumstances.
Compressed SVG files are not supported.
Web views have these limitations in Internet Explorer with the SVG Viewer plug-in:
In panning mode, the cursor does not change.
On a Japanese Microsoft Windows system, you must edit the Windows registry to obtain Japanese text in menus. Define this key:
HKEY_CURRENT_USER\Software\Adobe\Adobe SVG Viewer\version\Locale
version. For example, if the plug-in version is 3.03, define this key:
HKEY_CURRENT_USER\Software\Adobe\Adobe SVG Viewer\3.03\Locale
Then, define a string value for this key. The value name is
and the value data is
The Model Loop component can now report on libraries. The Model Loop attribute pane in Report Explorer specifies which libraries to include in the report.
A new Model Advisor Report component runs Model Advisor and includes its report in the report you are generating.
The Report Explorer interface has a number of enhancements. The View menu has commands to increase and decrease font size and to show the message window if it is not displayed.
Simulink Report Generator performance has improved. Reports are often generated more rapidly and with less chance of running out of memory.
You can create advanced table layouts for Simulink and Stateflow property tables. The advanced layouts include cells that span multiple rows or columns.
You can take screen captures of Simulink and Stateflow editor dialog boxes. You can choose to display the current settings associated with an object, or document the appearance of your custom mask dialog boxes.
You can include Simulink annotations in your reports. A Simulink annotation is a text field that you can edit directly in the block diagram. You typically use an annotation to display brief information about a subsystem.
For more details, see Annotation Loop in the Simulink Report Generator documentation.
|Release||Features or Changes with Compatibility Considerations|
|R2014a||Extended and simplified |