report

Generate report from setup file

Syntax

report
report (setup1,...,setupN)
[report1,report2,...,reportN] = report(setup1,setup2,...,setupN)
report(systemname)
report (___,-fFORMAT)
report (___,-fFORMAT,-sTEMPLATE)
report (___,-fFORMAT,-sSTYLSHEET)
report (___,-oPATH)
report (___,-genOption)

Description

  • report with no arguments opens the Report Explorer. For more information on the Report Explorer, see Working with the Report Explorer

  • report (setup1,...,setupN) generates reports from the specified report setup files. The file names are character arrays that specify the paths of the setup files. You can specify one or more report setup files.

  • [report1,report2,...,reportN] = report(setup1,setup2,...,setupN) returns the names of the generated reports. If an error occurs when generating a report, the returned reportN name is empty.

  • report(systemname) generates a report specified by the ReportName property of a Simulink® system or its parent. If the system does not specify a report name, this syntax runs the report specified by the parent system's ReportName property.

  • report (___,-fFORMAT) specifies the output format of the report. To display a list of format IDs for template-based reports, use rptconvert('-domformatlist'). To display a list of legacy format IDs, use rptconvert('-formatlist'). You can use the template-based formats to convert both template-based reports and legacy reports. You can use the legacy formats only for converting XML files that use XSL or DSSSL style sheets to specify formatting. For example, to specify PDF output for a template-based report, use -fdom-pdf.

  • report (___,-fFORMAT,-sTEMPLATE) specifies the id of the template of type FORMAT (or style sheet, for legacy reports) to be used to generate a report. To display a list of templates available to format template-based documents, use rptconvert('-templatelist',FORMAT). You should specify a template that is compatible with the specified document format. For example, use a PDF template for a converted PDF document.

  • report (___,-fFORMAT,-sSTYLSHEET) specifies the id of the style sheet to be used to generate a report. To display a list of style sheets available to format documents of type FORMAT, use rptconvert('-stylesheet',FORMAT). Use a style sheet only for XML documents that specify a style sheet and only if FORMAT specifies a legacy output type, such as Adobe® Acrobat®.

  • report (___,-oPATH) sets the name of the generated report. You can specify a path or a single file name for the PATH. If you specify a single file name, the report is generated in the directory specified by the report setup file.

  • report (___,-genOption) specifies one of the following report generation options. You can specify more than one option.

    • -noview — Generates, but does not display, a report

    • -graphical — Opens the report in the Report Explorer and runs the report

    • -debug — Generates report debugging info at the MATLAB command line

    • -quiet — Suppresses command-line output during report generation

Examples

Set Generated Report Format

  • Generate the report testrpt in PDF format:

    report testrpt -fpdf

  • Generate the report testrpt in RTF format:

    report testrpt -frtf
  • Generate the report testrpt in Microsoft® Word format:

    report testrpt -fdoc

    Note

    Only Microsoft Windows® platforms support this option.

  • Generate a multipage HTML report from the figloop-tutorial report setup file:

    report figloop-tutorial -fhtml -shtml-!MultiPage

Generate a PDF Report Using the Default PDF Template

Generate a PDF report named magic-square using the default PDF template:

report('magic-square','-fdom-pdf-direct','-sdefault-rg-pdf')

Generate a PDF Report from a Simulink System

Generate a default report in PDF format on the Simulink model vdp. To generate this report, you need Simulink installed.

report vdp -fPDF

Specify File and Path of Generated Report

Generate a report named simple-report in the folder /tmp/index.html:

report ('simple-report','-o/tmp/index.html')

Generate a Report in the Directory Specified in the Report Setup File

Generate a report in the directory specified by simple-report.rpt:

report('simple-report','-oindex.html')