Main Content

getReporter

Class: systemcomposer.rptgen.finder.ComponentResult
Namespace: systemcomposer.rptgen.finder

Get component reporter

Since R2022b

Syntax

reporter = getReporter(result)

Description

reporter = getReporter(result) returns a reporter that you can use to include information about components in a model. You can use this reporter to customize what information to include and how to format the information. See systemcomposer.rptgen.report.Component for more information on how to customize the reporter.

Input Arguments

expand all

Component result, specified as a systemcomposer.rptgen.finder.ComponentResult object.

Output Arguments

expand all

Component reporter, returned as a systemcomposer.rptgen.report.Component object.

Examples

expand all

Use the ComponentFinder and ComponentResult classes to generate a report.

import systemcomposer.rptgen.finder.*
import mlreportgen.report.*
import slreportgen.report.*
import systemcomposer.query.*

rpt = slreportgen.report.Report(output="ComponentResultReport",...
CompileModelBeforeReporting=false);
add(rpt,TitlePage("Title","Components"));
add(rpt,TableOfContents);
chapter = Chapter("Title","Components");

componentFinder = ComponentFinder("mTestModel");
componentFinder.Query = AnyComponent;
result = find(componentFinder);

for i = result
    reporter = getReporter(i);
    reporter.IncludeProperties = false;
    reporter.IncludeSnapshot = false;
    add(chapter,reporter);
end

add(rpt,chapter);
close(rpt);
rptview(rpt);

Version History

Introduced in R2022b