Composed reports
A report template produces one table of report values for a scope and a period. A regulator or a plant manager often needs more than one table. They need a document with several sections, text, charts and tables, often repeated for each emission source or each month. A composed report is that document.
An administrator turns on the composed reports module, and the scheduled reports module, for a deployment.
This page explains how a composed report works. To open, export, share or schedule one, see Generate and share a composed report.
Two layers: calculation and document
A composed report separates two questions:
| Layer | Question | Defined by |
|---|---|---|
| Report template | Which values exist, and how does the product calculate them? | Report columns and named report results |
| Composition | How does the document arrange and present those values? | Sections, blocks and table layouts |
A composition does not calculate emission values itself. A table block refers to a report template. The template does the calculation with the normal report rules: unit conversion, STA, SSTA and VSTA handling, and the compliance rules of the regime. The composition only selects, groups and arranges the results. Thus a value in a composed report is the same value as in an ordinary report for the same template, scope and period.
Scope and period
A composition has three settings outside the document body:
- Boundary. The composition is available everywhere (global) or in one region only.
- Target. One generated report covers one region, one asset or one emission source.
- Period type. Day, week, month, quarter, year or a custom date range.
You choose the actual target and period when you generate the report.
Building blocks
The document is a list of sections. Each section is a grid of 24 columns. Blocks have a position and a size on that grid. A section can start a new page in the PDF and a new sheet in the Excel file. The page can have a header and a footer with text and images.
A section can repeat. For example, an asset report can repeat a section for each emission source of the asset. A yearly report can repeat a section for each month. Each repetition narrows the target or the period for the blocks inside it.
The block types are:
| Block | Content |
|---|---|
| Text | Paragraphs and headings. Text can contain tokens, for example the target name or the period label. |
| Image | An uploaded image, such as a company logo. |
| Table | Values from a report template, arranged in rows and columns. |
| Information table | Rows of labels and values: text, report values, constants and formulas. |
| Calibration | The latest completed calibration of the current emission source. |
| Chart | Values of a template column or a named result over time. |
| KPI | One highlighted value from a template column or a named result. |
Table layouts
A table block picks one dimension for its rows and one for its columns. One axis carries an entity: region, asset or emission source. The other axis carries time: day, week, month or quarter. Swapping the two axes transposes the table. An axis can also carry the report columns themselves, which gives the classic report layout.
A table can also add calculated columns with formulas over the report values, and summary rows above or below the data. An automatic total exists only for additive values, such as emission mass or operating hours. The product calculates that total with the calculation of the report column. A formula, a constant or a text column gets no automatic total.
YAML and the visual builder
The document body is stored as YAML. YAML is the record of the composition. The visual builder is an editor for that YAML:
- You drag and resize blocks on the grid. The builder writes the new positions back into the YAML. It keeps the comments and the other settings that you wrote by hand.
- In the builder, every data block binds to a named report template and its named columns and results. You select them by name, not by number.
A minimal composition looks like this:
sections:
- title: "{{asset.name}} - {{period.label}}"
blocks:
- text: "Monthly emissions report"
- each: emissionSource
title: "{{emissionSource.name}}"
blocks:
- table:
templateId: 42
The product validates the composition when you save it. It rejects, for example, an unknown block type, an unknown token, or a table that refers to a result that its template does not enable. It validates again when you generate a report. Then it checks, for example, that you have access to the target and that the repeated sections stay within the configured limit.
The generated report is a snapshot
When you generate a composed report, the product resolves every block for the selected target and period. It stores the complete result as a generated report. The generated report records the version of the composition and the request that produced it.
The generated report is a snapshot. It does not change later:
- A change to the composition does not change reports that you generated before.
- A change to an emission limit or another calculation setting does not change a generated report. Recalculate the periods first, then generate a new report.
- Open report shows the stored report for the same composition version, target and period. To get a new report, delete the stored one in History and open it again, or edit the composition, which creates a new version.
The product keeps generated reports until a user deletes them.
Outputs
The product renders every output from the stored snapshot. It does not calculate the values again for each format.
| Format | Use |
|---|---|
| HTML | View and preview in the product. Charts are interactive. |
| A fixed document for submission or archive. Charts are static images. | |
| Excel | A workbook with the tables. A section page break starts a new sheet. |
| CSV | The table data for further processing. |
Sharing
You can share a generated report with a link. The link contains a long random token. The product stores only a hash of the token. A share can have:
- an expiry date (the default is 30 days),
- a password, which the reader enters once and which never appears in the link,
- permission to download files, or permission to view only.
You can revoke a share at any time. Revoking the share does not delete the generated report. The product counts how often a share is opened and records when it was last opened.
For the steps, see Share the report with a link.
Scheduling
A schedule can generate a composed report at fixed calendar intervals. For each run, the product finds the targets that the schedule creator has access to and that are inside the boundary of the composition. It generates one report for each target, creates the requested export files and delivers them as the schedule specifies. The product records each run in the report execution history. A scheduled run does not create share links. For the steps, see Schedule the report.