Working with Table Data Regions
In a table data region, data is arranged into columns and rows. Tables have a static set of columns, and the number of rows in the table depends on the data in the dataset. Tables can contain as many columns as you want. Cells within the table can also span multiple columns. You can add grouping and sorting to arrange data within the table structure.
Using Report Designer, you can define tabular reports that contain table headers, table footers, group headers, group footers, and detail rows. You can add a table data region to a new blank report or an existing report. You can create a tabular report automatically using the Report Wizard. For more information, see Creating a Report Using Report Wizard. You can also create simple tabular reports using Report Builder. For more information, see How to: Start Report Builder.
Working with Table Data Regions
You add a table data region by selecting the table control from the Toolbox and dragging it onto the report. After the table is on the report, you can add columns and rows.
Handles
In Report Designer, you work with columns, rows, and the table by interacting with handles. Handles are gray boxes that appear above and next to the table when it is selected. The handles that run across the top of the table are column handles. The handles that run down the side of the table are row handles. The handle where the column and row handles meet is the corner handle. You can perform most actions with columns, rows, and the table by right-clicking on column handles, row handles, or the corner handle, respectively. To select the table, click the corner handle.
To view instructions about working with tables, see:
- How to: Add, Move, or Delete a Table (Report Designer)
- How to: Insert or Delete a Column (Report Designer)
- How to: Insert or Delete a Row (Report Designer)
- How to: Add a Group to a Table (Report Designer)
- How to: Sort Data in a Table (Report Designer)
Adding Data to a Table
After adding a table data region, you add fields to the columns in the table. To add fields to the table, you drag them from the Datasets list to a cell in the table.
Each cell in the table contains a text box by default. You can type any expression into any cell, or you can change the type of item within the cell to another type (for example, change a text box in a cell to an image). For more information, see How to: Change an Item Within a Cell (Report Designer).
Each table data region is associated with a dataset. If the report contains a single dataset, the table is automatically associated with that dataset when you place it on the report. If the report contains multiple datasets, you must associate the table with the correct dataset. For more information, see How to: Associate a Data Region with a Dataset (Report Designer).
Merging Cells
Multiple contiguous cells within a table can be combined into a single cell. This is known as a column span or a cell merge. Cells can only be combined across columns. When you merge cells, only the data in the first cell is preserved. If data exists in other cells, the data is removed. Merged cells can be split into their original columns.
To merge cells, select the cells, right-click the selected cells, and then click Merge Cells. To split merged cells, right-click the merged cells, and then click Split Cells.
Adding Subtotals
To add a subtotal to a table, add an aggregate expression to a cell in a group row. For example, if you have a table that is grouped by product category, product subcategory, and product, and you want to display a sum of sales by category and subcategory, you would place the expression =Sum(Fields!Sales.Value)
in the group header or footer rows for category and subcategory. Sum is an aggregate function. Reporting Services will calculate the sum of the values within the group and display the subtotal.
For information about aggregate functions, see Using Report Functions in Expressions (Reporting Services).
See Also
Concepts
Working With Fields in a Report Dataset
Sorting Data in a Report
Grouping Data in a Report
Working with Data Regions