-
Notifications
You must be signed in to change notification settings - Fork 204
Data Regions
A data region is a report item that repeats rows from a dataset. Majorsilence Reporting provides three types: Table, List, and Matrix. Choosing the right one determines how your data is structured on the page.
A Table has a fixed set of columns defined at design time. Rows repeat once per dataset row, and rows can be grouped into sections with headers and footers.
Use a Table when:
- You know the columns at design time (order lines, employee list, invoice items)
- You want column-aligned output with optional subtotals
- You need group headers and footers (subtotals per category, customer, date, etc.)
Adding a Table:
- Right-click the report body → Insert → Table.
- A default 3-column table appears. Drag column handles to resize; right-click column headers to add or delete columns.
- Bind cells to dataset fields by typing an expression or dragging a field from the Fields list.
Typical cell expressions:
={CustomerName}
={OrderDate}
=Format({Amount}, "C2")
See Grouping, Sorting, and Aggregates for adding group rows and subtotals.
A List repeats a free-form layout once per dataset row. Unlike a Table, there are no fixed column boundaries — you can place any combination of items anywhere inside the list cell.
Use a List when:
- The layout per row is non-tabular (e.g. a name-badge, a product card, a letter block)
- You want to nest other data regions (a List containing a Table is a common pattern for master-detail)
- Column alignment across rows is not required
Adding a List:
- Right-click the report body → Insert → List.
- A single rectangular cell appears. Place Textboxes, Images, Lines, and other items inside it freely.
- The cell repeats once per row in the bound dataset.
Nesting a Table inside a List: This is the standard pattern for a master-detail layout — the outer List iterates over customers; an inner Table inside each List cell shows that customer's orders.
- Bind the List to the master dataset (e.g.
Customers). - Inside the List cell, insert a Table and bind it to the detail dataset (e.g.
Orders). - Link the datasets with a parameter or a sub-report relationship.
A Matrix (also called a crosstab or pivot table) groups data on both rows and columns simultaneously. The row axis and column axis are both driven by data values, and the intersection cells contain aggregate expressions.
Use a Matrix when:
- Columns are data values, not fixed schema (e.g. one column per month, one column per region)
- You need a pivot/crosstab view
- The number of columns is unknown at design time
Adding a Matrix:
- Right-click the report body → Insert → Matrix.
- A 2×2 grid appears: row group cell (top-left), column group cell (top-right), data cell (bottom-right), and a corner cell (bottom-left).
Configuring a Matrix:
| Area | What to put here | Example expression |
|---|---|---|
| Row group | Field to group rows by | ={Category} |
| Column group | Field to group columns by | ={MonthName} |
| Data cell | Aggregate for the intersection | =Sum({Revenue}) |
| Corner / row header | Static label | "Category" |
Example — sales by category and month:
The row group expression is ={Category}; the column group is ={MonthName}; the data cell is =Sum({Revenue}). The engine automatically creates one column per distinct month value found in the dataset.
| Table | List | Matrix | |
|---|---|---|---|
| Columns defined at design time | Yes | N/A | No — driven by data |
| Rows repeat per dataset row | Yes | Yes | Grouped |
| Free-form layout per row | No | Yes | No |
| Group headers and footers | Yes | Yes | Yes (row and column totals) |
| Pivot / crosstab | No | No | Yes |
| Best for | Data grids, invoices, reports with subtotals | Cards, labels, master-detail | Pivot tables, time-series across columns |
Any data region can be placed inside a List cell or a Table cell to create nested layouts:
- List → Table: master-detail (one summary row per master, with a full detail table beneath)
- Table → Matrix: a table with a mini-pivot embedded in one of its cells
- List → Chart + Table: a card layout with both a sparkline chart and a data table per row
Nested data regions each bind to their own dataset. Use Report Parameters or Sub-reports to filter the inner dataset based on the outer row's value.