Generate Table of Contents for Embedded Web View Report

The slreportgen.webview.EmbeddedWebViewDocument base class of an Embedded Web View report generator embeds JavaScript® in the generated Embedded Web View reports. In addition to generating other portions of the report, the JavaScript generates a table of contents from the document section headings. When you open the report in a web browser, the hyperlinked table of contents appears.

To use this feature, your report generator fillContent method must use DOM API Heading objects to begin the sections and subsections of the report. For example,

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

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.