One way of organizing your report is to group information by a common value. Grouping records makes it easier to interpret the report and discover patterns within the data. For instance, you could group cities by their country.
Groups can be defined when you first create a report using the Report Wizard, or in the Report Designer if you are modifying the layout of your report or an existing template.
- On the second page of the Report Wizard, you have the option to group values based on a field.
- Double-click the field you want to use to group from the report fields list.
- Optionally, click Grouping Options and choose a grouping interval for the chosen field.
- Finish creating the report. On the last page of the Report Wizard, you will have two choices to view the report:
- Choose to preview the report to generate the report in the Report Viewer.
- Choose to modify the report's design to display the layout of the report in the Report Viewer.
- If you would like to insert additional grouping levels in the report, you can only do so from the Report Designer.
Click Edit on the Report Viewer toolbar to toggle to the Report Designer.
- You can add a new group in the Report Designer by right-clicking anywhere within the report's layout and from the context menu choose Insert > Group Header/Footer.
- Place a TextBox element within the new GroupHeader section and set its Data Field property to the field you want to use for the group.
- Click the GroupHeader section and set the Data Field property to the field you want to use for the group.