Report Templates
Report templates allow creating standardized reports with placeholders to easily run the same queries on different assets.
When opening a report template, a dialog is displayed to select the value of the placeholders.
A usage example could be the deployment stack of an application.
It requires several queries, such as Add path to physical server
query which are the same for any application (but resulting in different servers).
Note
Only users with the admin role can create and modify report templates.
The Report Templates are listed under the tab manage Reports.
Here you find the templates dropdown.
When opening this dropdown you will see the New Template
button and the templates.
The View All Templates
button on the upper right corner takes you to the overview of all the templates in the instane.
In addition, the asset sidebar lists compatible reports below the asset name and description. A click on this report template button creates a new report and uses the displayed asset as placeholder value.
Creating a new report template
A new template is created by using an existing report or creating a new template and replacing specific assets by placeholders. The Create a template button appears in the donut menu of an open report or under the manage report view(for autorized users only). In the save dialog, similar to normal reports, a name, description and visibility can be defined. In addition, report templates can have a descriptive icon. The available icons are managed in the admin area.
After the report has been saved as a template, the template editor shows the query and allows to replace blocks with placeholders.
Only blocks which contain literals or assets can be replaced with placeholders. The Preview tab shows how the generated form looks like for users and allows to test the report template with example values.
After creating a new placeholder, you can customize its name and description in the right column. When a user generates a new report using this template, these values are displayed in the form, thus they should explain what values should be supplied and what they are used for.
Asset placeholders provide two additional configuration fields:
-
Placeholder represents only a single asset?
If this checkbox is selected, the generated form allows to select only a single asset. If it is not checked, the placeholder can be replaced with multiple selected assets. -
Asset restriction
This field allows to define which assets can be used as values for this placeholder. Only assets that fulfill the restrictions can be selected as value for the placeholder. In addition, for matching assets this report is proposed in the asset detail sidebar.
For admins, report templates are listed together with reports on the Manage Reports view. Here the report template can either be edited via the donut menu, or opened with Use template button.