ActiveReports 8 > ActiveReports User Guide > How To > Section Report How To > Create Common Section Reports > Create a Summary Report |
In a section layout, you can display totals and subtotals by modifying the summary fields of a TextBox control. Use the following steps to learn how to add totals and subtotals in a report.
These steps assume that you have already added a Section Report template in a Visual Studio project and connected it to a data source. See Adding an ActiveReport to a Project and Bind Reports to a Data Source for further information.
Note: These steps use the Products table from the NWind database. The sample NWind.mdb database file is located in the [User Documents folder]\ComponentOne Samples\ActiveReports 8\Data folder. |
To calculate and display subtotals in a report
Fields
Field Name = CategoryID
Section = GroupHeader
Field Name = ProductName
Section = Detail
Field Name = UnitsInStock
Section = Detail
Field Name = UnitsInStock
Section = GroupFooter
To calculate and display grand total in a report
These steps are a continuation of the procedure above. The report generated at the end of this procedure contains totals and subtotals.