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: ... }Example
Section titled “Example”title: Order linesculture: en-USstyles: 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 }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 }
Properties
Section titled “Properties”dataset
Section titled “dataset”Type: text · Required
The dataset whose rows the table repeats.
filter
Section titled “filter”Type: expression
Row filter; may reference the enclosing row, e.g. =InvoiceId == Parent.Id.
Type: list of sort key
Row order.
columns
Section titled “columns”Type: list of object · Required
The columns: header, value and width.
showHeader
Section titled “showHeader”Type: true or false · Default: true
Shows the row of column headers.
repeatHeader
Section titled “repeatHeader”Type: true or false · Default: true
Repeats the header row on every page the table continues onto.
headerStyle
Section titled “headerStyle”Type: text
A named style for the header row.
footer
Section titled “footer”Type: list of object
Rows after the data rows, such as totals.
emptyText
Section titled “emptyText”Type: text
Text shown instead of the body when there are no rows.
columns
Section titled “columns”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.
header
Section titled “header”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).
footer rows
Section titled “footer rows”Each entry of footer, with the style properties too.
Type: text
A named style for the row.
visible
Section titled “visible”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).
footer cells
Section titled “footer cells”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.
isHeader
Section titled “isHeader”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.