Grouping means putting things into groups. In the previous recipe, all the data shown in the report was listed sequentially. Grouping data simplifies the structure of the report and makes it more readable. It also helps you to find details, if required.
We can group the data in the query as well as in the auto design node in Visual Studio. In this recipe, we will structure the report by grouping the VendorMaster report based on the VendorGroup to make the report more readable.
In this recipe, we will add fields under the grouping node of the dataset created earlier in Visual Studio. The fields that have been added in the grouping node will be added and shown automatically in the SSRS report.
Go to Dataset and select the VendGroup field.
Drag and drop it to the Groupings node under the VendorMaster auto design.
This will automatically create a new grouping node and add the VendGroup field to the group. Each grouping has a header row where even fields that don't belong to the group but need to be displayed in the grouped node can be added.
This groups the record and also acts like a header, as seen in the following screenshot: