Main Content

slreportgen.report.SummaryTable class

Package: slreportgen.report

Summary table reporter for finder results

Description

Use an object of slreportgen.report.SummaryTable class to summarize the search results obtained from a Simulink® model by using a Finder object.

Note

To use a Simulink summary table reporter in your report, you must create the report by using the slreportgen.report.Report class.

The slreportgen.report.SummaryTable class is a handle class.

Class Attributes

HandleCompatible
true

For information on class attributes, see Class Attributes.

Creation

Description

summaryTableRptr = slreportgen.report.SummaryTable() creates a summary table for an unspecified set of finder results.

Note

Adding a Simulink summary table reporter with unspecified results to a report causes an error.

example

summaryTableRptr = slreportgen.report.SummaryTable(finderResults) creates a summary table reporter for the finder result objects in the array finderResults and sets the FinderResults property to finderResults.

The summary table contains a row for each result whose entries contain properties of the found object. By default, the reported properties depend on the result object type. Use the summary table reporters Properties property to customize the set of properties to report on.

summaryTableRptr = slreportgen.report.SummaryTable(Name=Value) sets properties by using name-value arguments. Specify multiple name-value arguments in any order.

Properties

expand all

Finder result objects to report, specified as an array of objects of a finder result class such as slreportgen.report.FunctionReferenceResult, or slreportgen.report.SignalResult.

Attributes:

GetAccess
public
SetAccess
public

Title for the summary table, specified as a string, character vector, or a DOM object. By default, this property is empty and the reporter creates the table title by using the getDefaultSummaryTableTitle method for the finder result object specified by finderResults.

Specifying this property as a string scalar or character vector creates an mlreportgen.dom.Paragraph object with Style property set to 'SummaryTableTitleParagraph' in the generated report.

Attributes:

GetAccess
public
SetAccess
public

Properties of the result class to report on, specified as an array of string scalars or cell array of character vectors.

If this property is empty, the reporter determines which result object properties to report by using the getDefaultSummaryProperties method of the finder result objects specified in finderResults.

Use the getPropertyValues method of the finder result object specified by finderResults to identify the properties you can add to the summary table.

Attributes:

GetAccess
public
SetAccess
public

Whether to create a separate summary table for finder result objects based on the result object Type property, specified as true or false.

Attributes:

GetAccess
public
SetAccess
public

Whether to link the Name property of each object in the summary table to link to the corresponding reporter object, specified as true or false.

Attributes:

GetAccess
public
SetAccess
public

Whether to include columns for empty finder result object properties in the summary tables, specified as false or true.

Attributes:

GetAccess
public
SetAccess
public

Table reporter formatter type, specified as an mlreportgen.report.BaseTable object. The default value of this property is a BaseTable object with the TableStyleName property set to the FunctionReferenceTable style, which is defined in the default template for a FunctionReference reporter.

To customize the appearance of the summary table, customize the default reporter or replace it with a customized BaseTable reporter.

Attributes:

GetAccess
public
SetAccess
public

Methods

expand all

Examples

collapse all

This example shows how to add a summary table for finder results respresenting named signals in your Simulink® model to a report.

Create a PDF report and load the required model

import mlreportgen.report.*
import slreportgen.report.*
import slreportgen.finder.*

rpt = slreportgen.report.Report("SummaryTable","pdf");

% Open the model to report on
model_name = "slrgex_sf_car";
load_system(model_name);

% Create a chapter for the Summary Table Reporter
titleStr = sprintf("Summary Table for Named Signals in %s",model_name);
add(rpt,TitlePage(Title=titleStr,Author=""));

Create a SignalFinder object to find all the named signals in the model.

sigFinder = slreportgen.finder.SignalFinder(model_name);
sigFinder.IncludeInternalSignals = true;
sigFinder.IncludeUnnamedSignals = false;
results = find(sigFinder);

Create a summary table reporter for the results of the finder object.

reporter = slreportgen.report.SummaryTable(results);
reporter.Properties = ["Name","Source","DataType","Dimensions"];
reporter.Title = "Named Signals";
add(rpt,reporter);
close(rpt);
rptview(rpt);
close_system(model_name);

More About

expand all

Version History

Introduced in R2022a