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
值。
输入参数
reqSetList
— 需求集
字符向量 (默认) | slreq.ReqSet
对象 | 数组
报告生成的需求集。您可以指定单个需求集或需求集数组。要为所有已加载的需求集集生成报告,请将 'all'
指定为 reqSetList
值。如果没有为 reqSetList
指定值,则默认使用 'all'
。
reportOpts
— 报告生成选项
结构体
报告生成选项,指定为 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 | 布尔值 | 选择在报告中包含需求修订信息。 |
输出参量
myReportPath
— 生成的报告路径
字符向量
生成的报告的文件路径,指定为字符向量。
版本历史记录
在 R2018a 中推出
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)