Main Content

本页采用了机器翻译。点击此处可查看英文原文。

slreq.generateReport

生成需求集集报告

说明

myReportPath = slreq.generateReport(reqSetList, reportOpts) 使用 reportOpts 指定的选项为 reqSetList 指定的需求集集生成报告,并将路径 myReportPath 返回到报告。

示例

示例

全部折叠

% Generate a requirement report in Microsoft(R) Word
% format for all loaded requirement sets

% Get default report generation options structure
myReportOpts = slreq.getReportOptions(); 

% Specify the generated report path and file name
myReportOpts.reportPath = 'L:\My_Project\Reqs_Report.docx';
  
% Generate the report for all loaded requirement sets
myReport = slreq.generateReport('all', myReportOpts);

注意

要生成 PDF 和 HTML 格式的报告,请指定 .pdf.html 文件名作为 reportPath 值。

输入参数

全部折叠

报告生成的需求集。您可以指定单个需求集或需求集数组。要为所有已加载的需求集集生成报告,请将 'all' 指定为 reqSetList 值。如果没有为 reqSetList 指定值,则默认使用 'all'

报告生成选项,指定为 MATLAB® 结构体。如果未指定 reportOpts,则使用 slreq.getReportOptions 中指定的默认选项生成报告。

选项

字段数据类型描述
reportPath字符向量生成的报告路径。
titleText字符向量报告标题。
authors字符向量报告作者。
includes.toc布尔值选择在报告中包含目录。
includes.links布尔值选择在报告中包含需求链接。
includes.rationale布尔值选择在报告中包含需求理由。
includes.customAttributes布尔值在报告中包含需求集自定义属性的选项
includes.comments布尔值选择在报告中包含需求注释。
includes.implementationStatus布尔值选择在报告中包含需求实施状态数据。
includes.verificationStatus布尔值选择在报告中包含需求验证状态数据。
includes.keywords布尔值选择在报告中包含需求实施状态数据。
includes.emptySections布尔值选择在报告中包含空白部分。无论此设置如何,报告都包含您需求的需求类型自定义 ID摘要描述属性的空值。
includes.revision布尔值选择在报告中包含需求修订信息。

输出参量

全部折叠

生成的报告的文件路径,指定为字符向量。

版本历史记录

在 R2018a 中推出