Master Reports¶
Management of master report configurations in calServer V2.
Overview¶
The AdminReportSettingController enables the configuration of master reports. These form the foundation for report generation and define which JasperReports templates are used with which variables.
Concept¶
Master Report (Setting)
|
+-- JasperReports template (.jrxml)
+-- Variable configuration
+-- Output format (PDF / Excel / CSV)
+-- Execution log
Report Configuration¶
Overview¶
Under Admin > Reports > Master Reports, all configured reports are displayed:
| Field | Description |
|---|---|
| Name | Report name |
| Template | Assigned .jrxml file |
| Output Format | PDF, Excel, or CSV |
| Status | Active / Inactive |
Rows tagged "System report"
A few reports are produced by calServer itself, without anyone selecting them (the loan receipt of the rental mail, for instance). Those rows are always present and cannot be deleted, but are ordinary reports in every other respect. Details: System reports.
Upload JasperReports Template¶
- Navigate to Admin > Reports > Master Reports
- Click New Report
- Upload the
.jrxmlfile - Configure the variables
- Select the output format
- Save the configuration
JasperReports
Templates are created in JasperReports format (.jrxml). For editing, TIBCO Jaspersoft Studio is recommended.
Images need a text alternative
Every image in a template (logo, signature, barcode, chart) becomes a figure in the generated PDF. Without a text alternative a screen reader announces "graphic" and nothing more (EN 301 549 10.1.1.1).
The template supplies the text through <hyperlinkTooltipExpression> on
the image element — in Jaspersoft Studio the Tooltip field under the
hyperlink properties:
<image>
<reportElement key="trend" x="0" y="0" width="500" height="200"/>
<hyperlinkTooltipExpression><![CDATA["Deviation over twelve months, "
+ "falling from 0.8 to 0.2 per cent"]]></hyperlinkTooltipExpression>
<imageExpression><![CDATA[$P{chart}]]></imageExpression>
</image>
Without a tooltip the report runner falls back to the element's key, and
to a generic term if there is none. That prevents a figure without any
text, but it describes nothing — a chart needs its key message, a barcode
its value.
Variables¶
Report variables link database fields with placeholders in the template:
| Variable | Type | Description |
|---|---|---|
$P{deviceName} |
String | Device name |
$P{calibrationDate} |
Date | Calibration date |
$P{result} |
String | Calibration result |
$P{technician} |
String | Calibration technician |
$P{nextDueDate} |
Date | Next calibration due date |
Configure Variables¶
Scope: global, per report type, per report¶
Report variables are managed under Admin > Report Management > Report Variables and support three scopes:
| Scope | Meaning |
|---|---|
Global (all) |
Variable applies to all reports of all types |
| Report type | Variable applies to all reports of one type (inventory, calibration, booking, repair) |
| Single report | Variable applies only to the selected master report |
During generation the variables are resolved in this order — report-scoped variables override same-named type and global variables. This way a single calibration certificate can carry its own footer text while all other reports keep using the global one.
Per-report variables
Create a variable with the same variable name and assign it to a report
to override the global value for that report only. System variables
(company_*) cannot be deleted but can be overridden per report.
Positioning Signatures¶
Signature slots are configured per report under Admin > Report Management > Signatures. A signature slot defines where a captured handwritten signature is stamped onto the generated PDF.
Instead of typing the position in pixels, the signature is drawn directly onto a page preview:
- Click places the signature centred on the click point (default size).
- Drag moves the signature box.
- Drag a corner resizes the box.
- First/Last page selects which report page the signature lands on.
The Top / Left / Width / Height values below stay in sync and can be edited directly for pixel-precise fine-tuning.
Coordinate system
Positions are stored in CSS pixels (96 DPI) relative to the top-left corner of a portrait A4 page (794 × 1123 px) — the same values V1 uses. On download the server converts them to PDF points and burns the signature at the configured spot.
Output Formats¶
| Format | MIME Type | Usage |
|---|---|---|
application/pdf |
Calibration certificates, test reports | |
| Excel | application/xlsx |
Data export, analyses |
| CSV | text/csv |
Machine-readable export |
PDF as default
For calibration certificates and official documents, PDF should always be used as the output format.
Execution Log¶
The AdminReportRunLogController logs every report execution:
| Field | Description |
|---|---|
| Timestamp | When the report was executed |
| User | Who triggered the report |
| Report | Which master report was used |
| Status | Successful / Failed |
| Duration | Execution time in seconds |
| Error | Error message (on failure) |
Failed reports
For failed reports, check the execution log. Common causes are missing variables or connection issues with the JasperReports microservice.