# Design a report

> Create a report template in the screen designer's report mode - paper and margins, the page header and footer with page fields, the datasets and their bindings to the report's parameters, text, KPI tiles, tables with groups and subtotals, charts and repeat groups - preview it with real rows, render a PDF draft, then deploy it so that users can run it.

Product: eaxScada · Type: How-to guide · Editions: Pro, Enterprise
Source: https://eaxware.com/docs/eaxscada/how-to/design-a-report/
Verified against commit e8c8e34.

## Goal

Lay out a printable report once, in the same designer as your screens: a daily plant report with a header, a KPI tile, a table of the day's samples grouped by tag, and a chart. After a deploy, users run it from the **Analytics and Reports** workspace ([Run a report](/docs/eaxscada/how-to/run-a-report/)).

You need the right `reports_design` for the report tools (the report palette, the preview and the PDF draft), and the usual rights to edit and deploy screens ([Grant report rights](/docs/eaxscada/how-to/grant-report-rights/)). The report reads datasets: create at least one first ([Create a report dataset](/docs/eaxscada/how-to/create-a-report-dataset/)).

## 1. Create the report

1. In the Studio's designer, open **File > New Report...**, or **+ New > Report** in the **Displays** tree.
2. Fill in the **Report name**, the **Report id** (letters, digits, `_` and `-`; an id that already exists is refused: a screen never becomes a report), the **Folder**, the **Paper** and the **Orientation**, and optionally a **First dataset**.
3. Click **Create**.

The new report opens in **report mode**. It starts with:

- a date parameter **day** (default `yesterday`);
- a page header with the report's name, and a page footer with `Page {page} / {pages}` and the run time;
- with a first dataset: the dataset's window bound to the day, `from` = `{day}` and `to` = `{day}+1d`.

A report is a screen of kind **report**: it is saved, undone, compared, kept in the history and deployed like any screen, and operators never open it as a screen.

## 2. Set the page

With nothing selected, **Properties** shows the report (or click **Page** in the report toolbar):

- **Paper**: A4 (default), A3, Letter or Legal; **Orientation**: portrait or landscape;
- **Margins (mm)**: top, right, bottom, left (default 15 each, at most 100);
- **Language**: the language of the texts eaxScada prints (page numbers, quality words, "No good data", the simulated banner): en, fr, de, es or it (another language prints them in English); empty is the server's;
- **Number format**: the locale of numbers and dates, empty for the same as the language;
- **Time zone**: `site` (the server's `site.time_zone`, the default), `UTC`, or a zone name such as `Europe/Paris`;
- **Outputs**: PDF, Excel, or both.

## 3. Declare the parameters

**Parameters** lists what a run asks for. Each has a name, a type, whether it is required, a default and a description. The types are:

- **date**: a calendar day, `YYYY-MM-DD`, or a relative date such as `today`, `yesterday`, `start_of_month(-1)` or `today-7d`;
- **text**, **number**;
- **tagFolder**: a tag folder, for example `Plant/Line1`.

Write `{name}` in a text or a dataset binding to use a parameter's value. A parameter cannot be named after a page field (`page`, `pages`, `run_time`, `parameters`, `template_rev`).

## 4. Add the datasets and bind them

**Datasets** lists the datasets the report reads, each under an **alias** that the elements use (`plant_samples`). Click **Add**, choose the dataset, then fill in **Bound to** for each of its parameters:

- `{day}`: the report's parameter. A date becomes the start of that day in the report's time zone;
- `{day}+1d`, `{day}-2h`: the parameter with an offset (`d` and `w` are calendar days and weeks, `h`, `m`, `s` elapsed time);
- a literal value;
- empty: the dataset's own default.

Each dataset is read as the user who runs the report, with that user's read rights. A report reads at most 16 datasets.

## 5. Place the elements

Open the **Palette** tab. In report mode it holds the report elements and nothing else: screen objects are never placed in a report, so nothing in a report can write. Add an element with a click, **Enter**, or by dragging it onto a page.

| Element | What it shows | Set in Properties |
|---|---|---|
| **Text** | A paragraph with `{parameter}` and `{alias.column}` fields. `{alias.column}` is the dataset's first row, or the current row inside a repeat group. | The text. |
| **KPI tile** | One figure of a column: first, last, min, max, avg, sum or count, with its label and unit. Only good values count; the tile says "n of m samples good", or **No good data** when there is none. | Label, dataset, column, aggregate, format, unit. |
| **Table** | The rows of a dataset. Long tables flow over the pages, with the header repeated. | Dataset, columns (label, format), **Group by**, **Subtotal** (avg, sum, min, max, count) after each group, **Total row**. |
| **Chart** | A line, area, bar, scatter or pie chart of a dataset. Uncertain and bad samples and simulated values are always drawn as such. | Kind, X axis column, value columns, **One series per** (a column such as `tag_path`, one line per tag). |
| **Repeat group** | Its elements, repeated once per row of a dataset (one section per batch, per tag...). Groups nest three deep. | Dataset; drop elements into it. |
| **Page break** | The next element starts on a new page. | Nothing. |

Formats are names: `0`, `0.0`, `0.00` (decimals), `percent` or `0.0%` (times 100, with %), `date`, `datetime`. A subtotal or total takes the quality of its rows: good only if every row is good.

Keyboard on the pages: **Tab** selects the next element, **Delete** removes it, **Alt+Up** and **Alt+Down** move it, **Ctrl+D** duplicates it.

## 6. Fill in the header and footer

Click the **Page header** or **Page footer** band to edit its texts (at most 16 per band), their alignment (left, center, right) and the band's height. They are printed on every page and may use the parameters and these page fields:

| Field | Prints |
|---|---|
| `{page}`, `{pages}` | The page number and the page count. |
| `{run_time}` | When the run started, in the report's time zone. |
| `{parameters}` | Every parameter of the run, as `name = value`. |
| `{template_rev}` | The revision of the deployed template the run used (`DRAFT` in a PDF draft). |

A live tag reference such as `{Area/Tag}` is refused: a report reads its datasets, never live tags.

## 7. Preview and render a PDF draft

- **Preview values** sets the parameter values the preview and the PDF draft use. They are kept in this browser for this report; an empty value takes the parameter's default.
- **Preview** shows the layout with real rows, read as you, up to 10,000 rows per dataset. It is marked PREVIEW, and the layout is an estimate. **Refresh** reads the rows again; **Design** goes back.
- **PDF draft** sends the working copy (saved or not) to the server, which renders the real PDF with DRAFT on every page. It opens in a dialog with **Download**. A draft is never archived and has no run record; it is recorded in the audit trail as a preview.
[Image: The designer in report mode, Preview on: the PREVIEW banner says the rows are real, read as you, up to the preview limit, and that the PDF draft is the reference. The A4 page of the Daily production report for 2026-11-04 shows the header, three KPI tiles (Reactor 1 average 81.0 °C, Reactor 2 maximum 75.1 °C, Line 1 output 27,235 units), each marked "1 uncertain", a line chart of the two reactor temperatures and the start of the table "Hourly values by shift". The report is in the Reports folder of the Displays tree. Properties shows the page settings: A4 portrait, margins 15 mm, language, number format, time zone site, outputs PDF and XLSX.]
[Image: The same designer view in the dark theme: report mode with Preview on, the Daily production report's KPI tiles marked "1 uncertain", the reactor temperature chart and the hourly table, and the page settings in Properties.]

The preview uses real rows read as you; the PDF draft is the reference for the layout.
[Image: Page 1 of a PDF draft of the Plant daily report on A4: the title and date in the header, a KPI tile "value" with "255 of 259 samples good" under the figure, and a table of samples whose times carry the zone abbreviation CET. Three uncertain values are on an amber background, in parentheses with a ‡ mark, with Uncertain in the quality column. DRAFT is printed across the page and in the footer, with "Page 1 / 7".]
[Image: Page 1 of a PDF draft of the Plant daily report on A4: the title and date in the header, a KPI tile "value" with "255 of 259 samples good" under the figure, and a table of samples whose times carry the zone abbreviation CET. Three uncertain values are on an amber background, in parentheses with a ‡ mark, with Uncertain in the quality column. DRAFT is printed across the page and in the footer, with "Page 1 / 7".]

A PDF draft: uncertain values are marked by colour, parentheses and a mark, never by colour alone.
## 8. Save and deploy

1. **Save** (as any screen). The server checks the report: the page settings, every dataset alias and placeholder, every element's members, and that nothing in it can write. A refusal names the element or band at fault, and the report is not saved.
2. **Deploy** the project. The deploy checks every report again.
3. The report appears in **Analytics and Reports > Reports** with the deployed revision. Runs always use the deployed copy: a later change takes effect at the next deploy.

## Limits

A report holds at most 2,000 elements, 16 datasets, 64 columns per table or chart, 16 texts per band and 4,000 bytes per text; repeat groups nest three deep; an element is at most 2,000 mm high, a band 100 mm. The rows of each dataset follow the run's limits ([Limits per kind of run](/docs/eaxscada/explanation/analytics-and-reports/#limits-per-kind-of-run)).

## Troubleshooting

| You see | Why | Do |
|---|---|---|
| The save is refused, naming an element | A placeholder names a parameter or alias that does not exist, a member does not belong to that element, or the element can write. | Fix the element named; declare the parameter or add the dataset. |
| An element asks for a dataset first | Tables, charts, KPI tiles and repeat groups read a dataset. | Add one in **Datasets** (step 4). |
| The report is not in the Reports tab | It is saved but not deployed, or the user lacks `reports_view`. | Deploy the project; check the rights. |
| A column shows "not in the dataset" | The dataset no longer returns that column. | Choose another column, or change the dataset. |
| The preview and the PDF draft differ | The preview's layout is an estimate. | Trust the PDF draft. |

## Related

- [Analytics and Reports](/docs/eaxscada/explanation/analytics-and-reports/)
- [Analytics and Reports reference](/docs/eaxscada/reference/analytics-and-reports/)
- [Deploy screens to operators](/docs/eaxscada/how-to/deploy-screens-to-operators/)
