Summary: This page explains how to configure Report Generation used in the Engineering Dashboard.

Introduction

The Report Generation feature allows you to generate reports on the fly direct from the CAST Engineering Dashboard interface. Various reports can be generated, however, some require some configuration before they will work. See Engineering Dashboard - Report Generation for more information.

Standard Compliance Reports configuration

These reports are based on templates provided with CAST Report Generator and therefore CAST Report Generator for Dashboards (v. ≥ 1.9.0) must be present on the server running Apache Tomcat hosting your Engineering Dashboard or the CAST-RESTAPI-integrated.war file (if using the dashboards embedded in AIP Console) in order for the reports to function. In addition the report.properties file in your deployed Dashboard must be modified.

See CAST Report Generator - CAST Report Generator for Dashboards for more detailed instructions about the configuration process.

Custom Reports configuration

When using the Engineering Dashboard embedded in AIP Console, these reports cannot be configured.

To enable and define the reports for the category, edit the following file:

WAR 1.x
CATALINA_HOME\webapps\<dashboard>\engineering\resources\ed.json

WAR ≥ 2.x
CATALINA_HOME\webapps\<dashboard>\WEB-INF\classes\config\ed\ed.json

ZIP ≥ 2.x
<unpacked_zip>\configurations\config\ed\ed.json

Find the following configuration section:

{
	"id": "custom",
	"label": "Custom Reports",
	"reportTemplates":[]
}

Adding custom reports

To add your report for a custom template called Executive summary PPT.pptxAEP Sample Report.xlsx and My Custom Template 2019.docx change it as follows. Save the file and restart the host Apache Tomcat server for the changes to be applied:

{
	"id": "custom",
	"label": "Custom Reports",
	"reportTemplates":[
		{
            "templateLabel": "Executive summary PPT",
            "templateId": "Executive+summary+PPT",
            "fileType":"pptx"
		},
		{
            "templateLabel": "AEP Sample Report",
            "templateId": "AEP+Sample+Report",
            "fileType":"xlsx"
		},
		{
			"templateLabel": "My Custom Template 2019",
			"templateId": "My+Custom+Template+2019",
			"fileType":"docx"
		}   
	]
}

The template will then be available for generation:

  • Custom templates should be available in the Templates folder within the CAST Report Generator for Dashboards deployment folder, for example: ReportGeneratorCLIforAllOS\Templates.
  • templateLabel is a free text, this is used in the drop down list in the dashboard.

  • templateId should be the file name of the custom template name without the file extension and "+" signs in place of white space. For example, if your custom template name is My Custom Template.docx the templateId should be configured as "templateId": "My+Custom+Template+2019".

Adding custom report categories

Note that custom report categories are available in version ≥ 1.11.0.

Multiple Custom Report categories can be added, alongside the existing default "Custom Report" category. These custom categories can then be populated with custom reports in exactly the same way as the default "Custom Reports" category (see Adding custom reports):

To add a custom report category, edit the following file:

WAR 1.x
CATALINA_HOME\webapps\<dashboard>\engineering\resources\ed.json

WAR ≥ 2.x
CATALINA_HOME\webapps\<dashboard>\WEB-INF\classes\config\ed\ed.json

ZIP ≥ 2.x
<unpacked_zip>\configurations\config\ed\ed.json

Find the following configuration section:

{
	"id": "custom",
	"label": "Custom Reports",
	"reportTemplates":[]
}

First add a comma immediately at the end of the preceding section:

{
	"id": "custom",
	"label": "Custom Reports",
	"reportTemplates":[]
},

Now add a new section for your category and give it a unique "label" (example shown below). Populate it with your custom templates - the custom report category and custom templates will then be available for generation.

{
	"id": "custom",
	"label": "Custom Reports",
	"reportTemplates":[]
},
{
	"id": "CustomReport",
	"label": "Custom Reports_Category1",
	"reportTemplates":[
		{
			"templateLabel": "Custom report type1",
			"templateId": "CISQ+-+custom-+Summary",
			"fileType":"docx"
		},
		{
			"templateLabel": "Custom report type2",
			"templateId": "OWASP+-+custom-+Summary" ,
			"fileType":"docx"
		}
	]
}

Configure number of concurrent processes and timeout

Two options are available in the report.properties file to manage:

To view and edit these options, edit following file with a text editor:

WAR 1.x
WEB-INF\report.properties

WAR ≥ 2.x
WEB-INF\classes\application.properties

ZIP ≥ 2.x
<unpacked_zip>\configurations\application.properties

Find the following options and modify as required:

# Set the maximum number of concurrent Report Generator processes to limit the CPU and memory consumption
report.maxConcurrentProcesses=4

# set a delay to determine never ending ReportGenerator processing
# After this delay the Report Generator process will be killed
# 600 = 10 minutes 
report.maxDelayInSeconds=600

Save the file to update the changes and then restart the host application server or the application.