Main Content

getImpl

Class: slreportgen.report.Reporter
Namespace: slreportgen.report

Get implementation of reporter

Since R2021a

Syntax

impl = getImpl(reporter,report)

Description

impl = getImpl(reporter,report) returns the DOM object used to implement this reporter in the specified report. The implementation object can help you debug report generation problems.

Input Arguments

expand all

Reporter object, specified as an object of slreportgen.report.Reporter or subclass of slreportgen.report.Reporter.

Example: slreportgen.report.Diagram for a diagram reporter

Report, specified as an slreportgen.report.Report object.

Output Arguments

expand all

Implementation object, returned as a DOM object. The DOM object is usually an mlreportgen.dom.DocumentPart type object.

Examples

expand all

Use the getImpl method to obtain the DOM object used to create a diagram reporter. You can use the getImpl method with any type of reporter.

load_system("vdp")
import slreportgen.report.*
import mlreportgen.report.*
rpt = slreportgen.report.Report("output","pdf");
 
chapter = Chapter();
chapter.Title = "Diagram Reporter Example";
 
diagram = Diagram("vdp");
diagram.Snapshot.Caption = "The Van der Pol Equation";
diagram.SnapshotFormat = "svg";
diagram.Snapshot.Height = "4in";
getImpl(diagram,rpt)
ans = 
  DocumentPart with properties:

         TemplateName: 'Diagram'
         TemplatePath: '/mathworks/devel/bat/filer/batfs2561-0/Bdoc24b.2679053/build/runnable/matlab/toolbox/shared/slreportgen/rpt/rpt/+slreportgen/+report/@Diagram/resources/templates/pdf/default.pdftx'
                 Type: 'PDF'
        CurrentHoleId: '#end#'
      CurrentHoleType: 'Block'
    CurrentPageLayout: []
           OpenStatus: 'open'
               Parent: []
             Children: [1x3 mlreportgen.dom.Element]
                  Tag: 'dom.LockedDocumentPart:52160'
                   Id: '52160'

close(rpt);

Version History

Introduced in R2021a