Report Generator is supplied with a set of pre-defined templates which can be used as-is or adapted to your own needs. These templates are located here by default:
You can find a list of these templates in the Component documentation which is accessible from each Release Notes page.
- Some Application level templates provided in%PROGRAMDATA%\CAST\ReportGenerator\<version>\Templates\zh_CN have been translated into Chinese.
- Portfolio level templates provided in %PROGRAMDATA%\CAST\ReportGenerator\<version>\Templates\zh_CN\Portfolio have NOT been translated into Chinese and are instead provided in English.
Officially supported templates
CAST provides various templates that are officially supported. These templates include scores, transaction risks, propagated risks, trending, scan-by-scan comparisons, lists of critical violations, and lists of components that have the most impact if remediated. Officially supported templates are stored in :
There are a number of reports that have been generated with these templates. To see samples of some of these reports, please click CAST Report Generator - Sample Reports.
Changing the template storage location
You can change the location that CAST Report Generator uses to store templates by modifying the Settings option and then clicking Save at the bottom of the page:
You must then ensure that you store the templates in a folder hierarchy starting with Application or Portfolio - if not, the Report Generator will not be able to find the custom templates. For example, if the new template storage location is set to:
Then you should ensure that you create a folder hierarchy starting with Application or Portfolio. Templates can then be stored in any subsequent folder/subfolder, for example:
Creating your own custom templates
It is relatively easy to create your own custom templates for generating bespoke reports: CAST provides "base" templates that provide an explanation of how to do so (for Microsoft Word, Excel and PowerPoint) and also contain a large set of placeholders (example data that can be extracted in text, graph and table format) that can be copied and then adapted as necessary. The "base" templates are stored in:
You can use these base templates as the basis for creating your own report templates - simply copy them, make your changes and then save them with a different name. Refresh the Report template section to view the new template:
You must ensure that any custom templates are stored in the following locations (assuming that you are using the default storage location) so that they can be found by Report Generator:
Using the Excel output options
The CAST Report Generator supports the generation of reports in Excel format, as explained below. A template called "3 - Excel-components-library.xlsx" is also available as standard for Application reports.
Reuse of Word and PowerPoint blocks
- All table and text blocks can be re-used in Excel.
- To use any block in Excel, prefix all definitions with RepGen:TEXT or RepGen:TABLE.
- The data will be put on the exact location where the definition resides.
- Cells referencing a text block will have their content replaced with the actual value received from the REST APIs.
- Style and format information will be preserved. Report Generator will try and generate numeric-type values when the data provided by the REST API is numeric; otherwise, the data will be inserted as text.
- Formulas referencing “text block” cells will work as expected.
- Report Generator inserts new lines starting from the line that contains the "RepGen:TABLE;BLOCK_NAME;options…" definition. Existing content below the "RepGen:" will not be overwritten.
- Report Generator will not apply any style or format to inserted cells. However, Report Generator will try and generate numeric-type values when the data provided by the REST API is numeric; otherwise, the data will be inserted as text.
- Formulas referencing cells that are part of the block template will not be updated.
- As a result, it is recommended to reserve one worksheet per table block and insert formulas in one or more consolidation worksheets. Formulas referencing template cells should reference whole columns (e.g.: =SUM('raw_data_worksheet'!D:D)), or cell ranges that are large enough to address all data extracted from the REST APIs (e.g.: =SUM('raw_data_worksheet'!D2:D20000)).
- Graph blocks are not supported in Excel: only table and text blocks.
This block will display the Transaction Functions and the Data Functions as listed below:
- NO: means there is no header displayed from the data from the REST API
- YES: means that the header will be taken into account as stored in the REST API
- TF = Transaction Function display
- DF = Data function display