Specify Document Content for Embedded Web View Report

The fillContent method fills the document pane of the report that it generates with content specified by DOM API objects (see Report Generator Creation (MATLAB Report Generator)). The report generator inherits an append method from its slreportgen.webview.EmbeddedWebViewDocument base class. Use the append method in the fillContent method of your report generator. Each call to append adds its content after the previously appended content. The fillContent method can create a document of any length and content by repeated calls to the append method.

For example, this fillContent method begins by creating a report title.

function fillContent(rpt)
    import mlreportgen.dom.*  
    p = Paragraph('System Design Variable Report');
    p.Style = {Bold, FontFamily('Helvetica'), FontSize('18pt')};

For other tasks to create your Embedded Web View generator, see

To generate the Embedded Web View report, see Generate an Embedded Web View Report.