Create a table
Add a table, bind rows and see them on the canvas. Tables in the DocStudio designer user guide.
What a table is
A table shows a list as rows and columns. Each item of the list becomes a row and each column shows one value of the item.
Build one
- Provide sample data with a list, for example
{ "items": [ { "name": "Pen", "qty": 2, "price": 3.5 }, { "name": "Book", "qty": 1, "price": 12 } ] }. - Click Table in the toolbox. A table with starter columns is inserted.
- In the Data section set Source to the data path
items. - Open Table options and Columns in the Content group to shape the table.
- Check the canvas: one row per item.
You can also click a header or a body cell on the canvas to select its column.
Columns
Each column has a header text and a Cell content expression evaluated for every row. Inside the cell expression, paths start at the current row: name is the item's name. Use Add column to add more.
Rows from data
The number of rows comes from the list. The canvas shows the first 50 rows of the sample, the output shows all of them. An empty list uses the empty-state setting.
Empty list
In Table options, When there are no rows offers:
| Choice | Result |
|---|---|
| hide | The table is not drawn |
| message | A single row with your Message |
| showHeader | The header only |
Styling
Use Striped rows for zebra shading. Column style and alignment are in each column. Fonts and colors can be set on the table element in Style.
Limits
- A table has 1 to 200 columns.
- Cells cannot span rows. Footer cells can span columns.
- Nested tables inside a cell are not available.
Next: Columns, widths and alignment, Footer rows and totals, Pagination and large tables.