Udostępnij za pośrednictwem


Lesson 2: Adding a Group

You can add a group to the table that groups and sorts data by sales person. Adding a group organizes sales information into logical units of data by showing sales data for each sales person. You can add groups to tables, matrices, and lists.

To add a group to a tabular report

  1. In the Layout pane, click the table so that column and row handles appear above and next to the table. For more information about parts of a table, see Working with Table Data Regions.

    Note

    Handles are gray boxes that appear above and next to the table. You use handles to perform various actions on columns, rows, and the table itself. 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.

  2. Right-click on the handle of any row and then click Insert Group.

  3. On the General tab, for Group on, select =Fields!LastName.Value in the first row and =Fields!FirstName.Value in the second row. This will group the data by sales person name.

    General tab, Grouping and Sorting Properties page

  4. On the Sorting tab, for Sort on, select =Fields!LastName.Value in the first row and =Fields!FirstName.Value in the second row, each with a direction of Ascending. This will sort the groupings by sales person name.

    Sorting tab, Grouping and Sorting Properties page

  5. Click OK. Two new rows, a group header and a group footer, are added to the table.

Next Steps

You have successfully added a group that arranges sales data by the name of the sales person. Next, you will add a new column to the report. See Lesson 3: Adding a New Column.

See Also

Concepts

Tutorial: Adding Grouping, Sorting, and Formatting to a Basic Report

Other Resources

Grouping Data in a Report

Help and Information

Getting SQL Server 2005 Assistance