Skip to content

Template

A template is a YAML or JSON file, conventionally named name.report.yaml. Its top level holds the document’s settings and the declarations its body uses. Unknown properties are errors, so a typo is caught when the template is loaded. The JSON Schema gives your editor the same checks as you type.

title: "Invoice {Number}"
culture: en-IE
page: { size: A4, margins: 20mm }
document: { compliance: [pdf-a-3b, pdf-ua-1] }
parameters: { ... }
data: { ... }
variables: { ... }
fonts: { ... }
styles: { ... }
body: { ... }

Type: whole number · Default: 1

Format version. Only 1 exists.

Type: text

Document title (a text template); also the PDF title and the default H1 for tagging.

Type: text

Formatting culture for numbers and dates, e.g. “en-US”. Defaults to invariant.

Type: text

Natural language of the content (BCP 47). Defaults to culture; required for PDF/UA.

Type: object

Paper size, orientation and margins.

Type: object

PDF metadata, tagging, compliance profiles, attachments and e-invoicing.

Type: names to object

Values supplied when the report runs, by name. Expressions read them by name.

Type: names to object

Datasets by name. Only their shape lives in the template; the host supplies rows.

Type: names to expression

Named expressions evaluated per row of the body dataset, usable anywhere by name.

Type: names to object

Font families to embed, by the name the font style property uses. Without one, text uses the standard Helvetica, which cannot be embedded.

Type: names to object

Named styles, applied with style on bands, elements, table columns, rows and cells.

Type: object

The bands and groups of the report.