Skip to main content

Tables and repeating data

Bind a table to an array​

Bind a table to an array field in your schema, such as lineItems[]. The bound body row repeats once per item in the PDF. In the designer you see one row of field chips; the data fills in when you preview or render.

Rows grow to fit their data​

A row's height is a minimum. When a cell's content wraps onto more lines, the row grows in the PDF so nothing is cut off.

  • Rows that grow: bound body rows, and non-header rows that print a field or a token (other than the page number tokens).
  • Rows that never grow: header rows and rows of plain text. The canvas shows them exactly as they print.

The designed space above and below the text is kept, and Arabic is compared with Arabic.

Edit what a cell prints​

Double-click a bound body cell to edit it. It starts as its field, and you can write more, for example:

{{UnitPrice}} JOD
  • Type {{ for a field autocomplete.
  • You can also use document fields and date tokens such as {{$today}}.
  • A missing field prints nothing inside a bound row. The designer flags it amber instead.
  • Typing the bare field token back returns the cell to a plain binding. Reset to field does the same.

Header cells are plain labels: you rename them, and they don't take tokens.

Master-detail and nested bands​

A repeating section can sit inside another, for example orders[] containing lines[]. Inside a repeating band, a field is looked up in the enclosing row first, then in the top-level data. So a table of lines can also print the order's {{orderNo}}.

The same rule applies to the field picker, the {{ autocomplete and the cell chips. Nesting works two array levels deep.

Fixed data in the middle: Block​

A Block is a Report section that prints once, exactly where you place it between the other sections. Use one for an address box between the items and the totals, a summary, or terms. Add it from any section's ⋯ → Insert band menu, or from + Add section.

A Block can be linked to an object in your data under Binding. For example, with this data:

{ "invoiceNo": "INV-7", "lineItems": [ … ], "shipping": { "name": "Lina Haddad", "city": "Amman" } }

a Block linked to shipping prints {{name}} and {{city}} directly. Fields from the rest of the document, such as {{invoiceNo}}, still work inside it. A nested object works too, written as a dot path like customer.address.

A Block that isn't linked prints with the document's data. It never disappears from the PDF, even if its object is missing from the data you send.

Use a Detail to repeat a section for each row of a list. Use a Block for something that appears once.