Appearance
Editing tables
The Reportforge designer edits a table's grid directly: pick cells on the page, then insert or delete rows and columns, merge cells or split them. Each change is one step to undo, and the designer keeps merged cells consistent, so a table never ends up with cells that overlap or run past its edge.
What you can edit depends on the table:
- A static table has rows you write: its header, body and footer rows. All of them can be edited.
- A bound table gets its body rows from data, one for each item. You can edit its extra header and footer rows (above the column headers and below the column footers) and its columns, but not the rows that come from data.
Picking cells
Click a cell on the page to pick it. The table becomes the selection, and the picked cell is shaded. Shift+click another cell of the same part of the table (header, body or footer) to pick the rectangle between them. A rectangle that touches part of a merged cell grows to take all of it.
A text, image or other node inside a cell is still picked as itself when you click it.
From the keyboard, Tab and Shift+Tab move to the next or previous cell, in reading order through the header, body and footer. From the table's last cell, Tab leaves the canvas as usual.
The inspector's Table section shows the same cells as a small grid. Picking a cell there picks it on the page too, and Shift+click works the same way.
The Table menu
Right-click a picked cell (or press Shift+F10 or the Menu key) and open Table. A right-click on a cell that isn't picked picks it first.
| Item | Does |
|---|---|
| Insert a row above, Insert a row below | Adds an empty row next to the picked cells. A cell merged across the new row's place stretches over it. |
| Insert a column to the left, Insert a column to the right | Adds an empty column to every part of the table. A table with column widths gets a column with no width. |
| Delete the row, Delete the column | Deletes the rows or columns the picked cells are in, with what they hold. Merged cells across them shrink. A table keeps at least one column. |
| Merge cells (Ctrl+Shift+M) | Makes the picked rectangle one cell. The cells' text is kept in reading order, a line each. |
| Split cells (Ctrl+Shift+S) | Splits each merged cell among the picked ones back into single cells. The text stays in the first. |
| Select the row, Select the column | Picks the whole row or column of the table's part. |
| Select the table | Selects the table, with no cells picked. |
An item that doesn't apply says why, for example "Pick more than one cell to merge: Shift+click another."
The same commands are in the command palette (Ctrl+Shift+P), under Table, and in the shortcut sheet.
The inspector's Table section
Select a table to see its Table section above its other properties:
- Cells: the grid of the table's own cells. A bound table shows one line for the rows from data. With one cell picked, set how many Rows and Columns it spans: more merges the cells it grows over, fewer gives back empty cells. With several picked, Merge and Split work on them.
- Column widths: a length (
30mm),auto, or a share of the space left (1fr) for each column. A static table without declared columns is sized automatically; Set widths declares a column for each, so they can have widths. Add a column and Remove add and delete columns. - Rows: how many header, body and footer rows the table has, with Add (at the end) and Remove (the last). A bound table counts its extra header and footer rows only.
What can't be done
- Rows shown by a condition. In a part of a table whose rows have Show if (
if), cells can't be picked on the page, because the page doesn't show which rows are there. Use the inspector's grid instead. - A bound table's data rows can't be picked or edited as cells: change the columns that make them.
- Cells that already overlap or run past the table (written by hand) can't be edited until they're fixed: the designer refuses the edit and says why.
For developers
The edits are the table operations of RFML §21.1: insertRows, removeRows, insertColumns, removeColumns, mergeCells and splitCell (crates/rfml-ops/src/table.rs). They address rows, columns and cells by grid position, and refuse a merge that cuts a merged cell with edit/table-span. MCP agents and the assistant have them too.
In the studio:
web/packages/inspector/src/table.tsholds the grid model, the picked rectangle, Tab order, the mapping between cells and the layout model's boxes, and the commands.web/apps/designer/src/composables/useTableCells.tsholds the picked cells for one designer, and draws them on the canvas.web/apps/designer/src/commands/table.tsholds the Table commands, their keys and the Table submenu.- The layout model's rows carry no index, so a body row on a later page is placed by counting the body rows of the table's earlier fragments.