Skip to content

Table element

Repeats rows over a secondary dataset (invoice lines, order items). Inside the table, bare names resolve to the table’s row first and then to the enclosing body row; aggregates in the footer default to the table’s rows.

- { type: table, dataset: ..., columns: ... }
table.report.yaml
title: Order lines
culture: en-US
styles:
header: { fontWeight: bold, borderBottom: "0.75pt solid #000000", padding: 2pt 0 }
data:
lines: { fields: { Product: string, Quantity: int32, Price: decimal } }
body:
reportHeader:
- content:
- type: table
dataset: lines
sort: [Product]
headerStyle: header
columns:
- { header: Product, value: "{Product}", width: 3fr }
- { header: Qty, value: "{Quantity}", width: 1fr, align: end }
- { header: Price, value: "{Price:C}", width: 1fr, align: end }
- { header: Amount, value: "{Quantity * Price:C}", width: 1fr, align: end }
footer:
- borderTop: "0.75pt solid #000000"
cells:
- { value: Total, span: 3, fontWeight: bold }
- { value: "{Sum(Quantity * Price):C}", fontWeight: bold, align: end }
table.data.yaml
data:
lines:
- { Product: Support contract, Quantity: 1, Price: 480.00 }
- { Product: Consulting (hours), Quantity: 12, Price: 95.00 }
- { Product: Training day, Quantity: 2, Price: 650.00 }
The table example, rendered by Tagua.

Type: text · Required

The dataset whose rows the table repeats.

Type: expression

Row filter; may reference the enclosing row, e.g. =InvoiceId == Parent.Id.

Type: list of sort key

Row order.

Type: list of object · Required

The columns: header, value and width.

Type: true or false · Default: true

Shows the row of column headers.

Type: true or false · Default: true

Repeats the header row on every page the table continues onto.

Type: text

A named style for the header row.

Type: list of object

Rows after the data rows, such as totals.

Type: text

Text shown instead of the body when there are no rows.

Each entry of columns. Columns also have the style properties, which apply to their data cells.

Type: text

A named style for the column’s data cells.

Type: text

Header text (template). Becomes a TH cell in the structure tree.

Type: text · Required

Cell text (template), evaluated for each row.

Type: length · Default: 1fr

Column width: pt (or another unit), %, fr (a share of the width left) or auto (as wide as its content).

Each entry of footer, with the style properties too.

Type: text

A named style for the row.

Type: expression

Leaves the row out where this is false.

Type: list of object · Required

The cells, left to right (right to left in rtl text).

Each entry of a footer row’s cells, with the style properties too.

Type: text

A named style for the cell.

Type: text

Cell text (template).

Type: whole number · Default: 1

The number of columns the cell covers.

Type: true or false · Default: false

Marks the cell as a row header (TH with Row scope) for tagging.

It also has the properties of every element and the style properties.