A Tablix data region displays data in cells that are arranged in rows and columns. It provides enhanced layout capabilities ranging from the creation of simple tables to advanced matrices. Tablix is essentially a combination of two data regions, the table, and the matrix. Therefore, it provides all the features of a table and a matrix along with added capabilities including support for multiple adjacent groups on rows or columns and improved layout flexibility with stepped group layouts.
By default, each tablix cell contains a TextBox control, and the function for each cell is determined by its location. You can change the layout of the Tablix data region using the LayoutDirection property.
The Tablix data region is composed of four areas denoted by dotted lines on the design surface - the corner, the row group area, the column group area, and the body.
The Corner element is located in the upper-left corner, or upper-right corner if a tablix has the LayoutDirection property set to Rtl. The layout direction applies at preview time only. This area is automatically expanded horizontally or vertically when you add a new column or row groups. You can merge cells inside the tablix corner and insert a data visualizer such as a TextBox or Image.
A corner may contain only static cells that are rendered only once in Tablix.
A Column group is represented by square brackets above the columns. Tablix column groups are located in the upper-right corner (upper-left corner for the Rtl layout). A column group represents a member of the column groups hierarchy and displays the column group instance values.
A Row group is represented by square brackets on the left side of the rows. Tablix row groups are located on the lower-left corner (lower right for the Rtl layout). A row group represents a member of the row groups hierarchy and displays row group instance values.
The Body element is used for displaying aggregated data with respect to row and column grouped data in the report. The body may contain only static cells that are rendered only once in Tablix.
Rows or columns in the Tablix data region can be static or dynamic. The Tablix data region contains multiple rows and columns that provide a grid-type layout, where you can add or remove static or dynamic rows and columns in order to display your data efficiently.
When you select a Tablix data region, the row and the column handles appear. These handles help you to work with a Tablix and visually specify the type of data added in your tablix layout.
The following table shows the different types of handles that appear in a Tablix data region.
Handle Icon | Description |
---|---|
Row or column with one outer group. | |
One outer group and one inner group. | |
One outer group with an extra row for totals and one inner group. |
The Tablix data region provides context menu options to perform basic layout actions. You can access layout options for Tablix rows from the context menu by right-clicking on a selected row.
You can access layout options for Tablix columns from the context menu by right-clicking on a selected column.
The Group Editor window gets displayed or hidden by the Group Editor icon, located on the left of the Design area. The Group Editor contains the following groups:
The static column cell displays the label YEARS and CATEGORY NAMES in the Tablix data region. The static row cell displays the label Total in the Tablix data region.
The image below displays the subjects in a row group. Nested column groups display practical and theory scores for the students. The total row displays the total scores for all of the subjects.
Groups categorize the report data using a specified expression. You can add a group by using the context menu options or in the Group Editor component that is part of the designer.
In Tablix, you can add row/column groups in the following ways:
See Manage Page Breaks in Data Regions topic for more detail.
The intersection of a Row and Column Group displays one or more summary values. For example, in a report output, Row Groups may display media types, Column Groups - quarters, and their intersections may show the Sales for each media type in each quarter.
A tablix can display two types of totals.
To add a total,
Tablix cells with the same value in a row group or a column group area are automatically merged. In the case of static cells, you can combine adjacent cells in horizontal (same row) or vertical (same column) direction into a single cell. For example, you may want a column header to span across the columns.
To merge cells,
The AutoMergeMode property lets you set the mode to merge the adjacent cells (text boxes) in a row group with the same value. This property takes Always, Never, and Restricted values. The row groups with the same data values and with AutoMergeMode property set to:
Let us take an example. In the following simple Tablix data region, 'District' column is Outside Group - Right to the 'Region' column group. We want the 'District' values to merge in case the 'Region' values are the same.
The tablix without AutoMergeMode set in any cell looks as follows:
Let us set the AutoMergeMode property for the 'District' and the 'Region' values.
If you set the RepeatToFill property to True (the default value is False), the Tablix will fill extra space with empty rows.
Setting the RepeatToFill property to 'True' (default value is 'False') fills the tablix with empty rows to reach the Fixed Height of the tablix. So, each page of the report displays the tablix with the same height. For example, the following image shows the page of a report where RepeatToFill property for the Tablix data region is set to 'False':
Then, in the Properties panel, set the RepeatToFill property to 'True'. At the report preview, you will see that the tablix now has additional empty rows on the same page of the report.
When you use a Tablix data region containing a large amount of data in an RDLX report, the user must scroll to see all of the data. On scrolling the column or row headers out of sight, the data becomes difficult to understand. To resolve this problem, you can use the FrozenRows and FrozenColumns properties that take effect in the JSViewer in Galley mode, and allow you to freeze headers so that they remain visible while scrolling through the data region. You can freeze as many rows or columns as you have headers in the data region.
Here's how a report with one frozen row and column headers looks like in JS Viewer.
If any header cells that you want to freeze are merged, you should not set the FrozenRows or FrozenColumns property to a value that would split a merged cell.