To create a MATLAB® program that generates an Embedded Web View report:
Create a MATLAB class that defines a report object that generates a Web View report. See Create an Embedded Web View Report Generator Class for a summary of the steps to create and define the class.
To generate the report, use this class in a MATLAB program. See Generate an Embedded Web View Report.
For general information and how to view and navigate a generated report, see Embedded Web View Reports.
To create an Embedded Web View report class, use this workflow:
Open the MATLAB editor.
To create a default class definition file, select New > Class.
Replace the default content of the new class definition file with this Embedded Web View class definition template:
classdef REPORT_GENERATOR < slreportgen.webview.EmbeddedWebViewDocument methods % Report generator constructor function rptev = REPORT_GENERATOR(reportName,modelName) rptev@slreportgen.webview.EmbeddedWebViewDocument(... reportName,modelName); end % Report content generator function fillContent(rptev) end end end
Replace the placeholder, REPORT_GENERATOR
, with the
name of your report generator.
To save your new class definition file using the name you used to
replace the REPORT_GENERATOR
placeholder, select Editor > Save As.
To specify the export options and warning suppression option for your report generator, edit the template constructor. See Specify Export Options for Embedded Web View Report and Suppress Link Warning Messages for Embedded Web View Report, respectively.
To include the report content, table of contents, model, and
hyperlinks to embed in your report, edit the content generator
(fillContent
) function. These topics describe
how to add content to the Embedded Web View report generator. You can
perform these tasks in any order.
Save your changes to the new class definition file.