Main Content

getReporter

Class: systemcomposer.rptgen.finder.AllocationListResult
Namespace: systemcomposer.rptgen.finder

Get allocation list reporter

Since R2022b

Syntax

reporter = getReporter(result)

Description

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

Input Arguments

expand all

Allocation list result, specified as a systemcomposer.rptgen.finder.AllocationListResult object.

Output Arguments

expand all

Allocation list reporter, returned as a systemcomposer.rptgen.report.AllocationList object.

Examples

expand all

Use the AllocationListFinder and AllocationListResult classes to generate a report.

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

rpt = slreportgen.report.Report(output="AllocationListResultReport",...
CompileModelBeforeReporting=false);
add(rpt,TitlePage("Title","Allocations"));
add(rpt,TableOfContents);

allocationListFinder = AllocationListFinder("AllocationSet.mldatx");
allocationListFinder.ComponentName = "mTestModel/Component1";
chapter = Chapter("Title",allocationListFinder.ComponentName);
result = find(allocationListFinder);
reporter = getReporter(result);

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

Version History

Introduced in R2022b