V1
V1

Tablix

A Tablix data region displays detailed or grouped data in cells arranged into rows and columns.

Tablix has mainly four areas: the body, the row group, the column group, and the corner. The Tablix Wizard is used to populate the data in these areas of the tablix.

Using the Tablix Wizard

  1. Drag and drop the Tablix data region onto the design surface and click Open Tablix Wizard on the right of the tablix.

  2. Select the dataset for the Tablix.
    Note: Before working on the Tablix layout design, you need to first add a dataset to your report.

  3. Drag-drop the fields available in the dataset to:
    Rows: row group that expands downward.
    Columns: column group that expands across the page.
    Values: data where rows and columns intersect, which makes the body area. You can also modify the aggregate and format of the added value.

  4. Set the layout of the Tablix:
    Total: to show totals or subtotals for the groups.
    Styling: to apply styles on Tablix.
    Organization:
       ◦ Set Expand and Collapse for Groups: display plus sign to expand and minus sign to collapse.
       ◦ Add Frozen rows and columns: set rows or columns to freeze. This is useful incase a data region contains a large amount of data (in an RDL report)and 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.

Adding Groups in Tablix

Lets see how groups are added in a report with Tablix data region. The Group Editor is specifically designed to manage the tablix structure.

The group expressions of the added groups can be viewed in the properties pane by selecting the row or column group from the Group Editor, or from the the tablix itself. Let's add groups in the report with Tablix data region as shown:
       

Add an adjacent group

  1. Right-click the MediaType column group area to view options in the context menu.
  2. Go to Column Group and select Adjacent After.
  3. Drag and drop the SaleDate field on the added adjacent group.

Add a Child Group

  1. Right-click the MediaType column group area to view options in the context menu.
  2. Go to Column Group and select Child.
  3. Drag and drop the Country field on the child group area.

To display the aggregate price for the sale dates,

  1. Drag and drop the Price field onto the body of the tablix.
  2. Go to Properties and change the Value to =Sum(Fields!Price.Value).

       

Adding Filters in Tablix

You may need to add filters on the data or apply grouping and sorting in order to get make data more organized.

Let's see how to use filters to limit the horizontal data for MediaType column group in the above tablix.

Add filter to MediaType column group so it displays only two types of media - VHS and DVD.

  1. Select MediaType column group and from the Tablix Member tab, go to Filters.
  2. Click Show Items and select Add Item.
  3. Click the icon on the right to display the filter properties.
  4. Click the radio button next to Filter Expression to display the fields and select the MediaType field.
  5. Click the drop down next to Operator and select 'In'.
  6. Click Show Items to open Filter Values.
  7. Click Add Items and enter text 'VHS'.
  8. Click Add Items again and enter 'DVD'.

To display dates in the order of occurrence,

  1. Go to Sort Expressions property, click Show Items, and then click Add Item.
  2. Enter the expression =Fields!SaleDate.Value. Set the sort order to ascending (default).