Table of Contents
Although Klaros-Testmanagement already offers a large number of predefined reports, these are often not sufficient if there are special requirements regarding content or layout. For this reason, the Klaros-Testmanagement Enterprise Edition can also be used to create your own reports. Figure 11.1, “The Report Generation Process” gives an overview of the reporting process.
Two user groups are involved in the generation of a report:
Report Designer and
The report designer determines the parameters of a report and defines which data from the database should be used for this purpose. It also defines the layout and content of the report template.
The user selects the parameters with which the report is to be created and retrieves the report as a PDF or Excel file.
The layout template defines the layout and content of the report and is defined in an XML-based description language.
The report script extracts the data from the database and prepares it for the use of the data in the report template.
The report script retrieves and formats the data and is formulated in Groovy or Java.
It is provided by a class that implements the Section E.2, “KlarosScript Interface”.
This interface defines a single method called
and uses a de.verit.klaros.scripting.KlarosContext
object as an input parameter.
This chapter covers the creation of user defined report templates so it primarily of interest to report designers. Section 9.2, “Reports” shows how users can generate reports from them.
The report script provides the data for the rendering of the layout template. It retrieves the data either directly from the object model de.verit.klaros.core.model or from the database via the HQL query language.
The resulting data for the layout template must then be stored in the de.verit.klaros.scripting.KlarosContext object which has been passed to the execute method.
If parameters are defined, they are available via the context object to both the report script and the layout template.