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

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

load_system("slrgex_vdp")
import slreportgen.report.*
import mlreportgen.report.*
rpt = slreportgen.report.Report("output","pdf");
 
chapter = Chapter();
chapter.Title = "Diagram Reporter Example";
 
diagram = Diagram("slrgex_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/batfs1904-0/Bdoc24a.2528353/build/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:8'
                   Id: '8'

close(rpt);

Version History

Introduced in R2021a