Report totals in Microsoft Access help you summarize information displayed in a report. You can calculate the sum, count, average, maximum, and minimum of values. These calculations are useful for preparing fee reports, sales reports, student summaries, and financial reports.
Report totals are calculated values that summarize records in a report. Totals can be displayed for the entire report or for individual groups.
| Student ID | Student Name | Course | Fee Paid |
|---|---|---|---|
| 101 | Rahul Kumar | ADCA | ₹5,000 |
| 102 | Priya Singh | Tally Prime | ₹4,000 |
| 103 | Amit Kumar | ADCA | ₹3,000 |
Total Fee Paid: ₹12,000
The report can display the total fee paid by all students instead of requiring you to add the values manually.
Aggregate functions calculate summary values from multiple records.
| Function | Purpose | Example |
|---|---|---|
| Sum | Adds numeric values. | Total fees paid. |
| Count | Counts records or non-null values, depending on the expression. | Number of students. |
| Average (Avg) | Calculates the arithmetic mean. | Average marks. |
| Maximum (Max) | Finds the largest value. | Highest fee payment. |
| Minimum (Min) | Finds the smallest value. | Lowest fee payment. |
You can add a calculated control to a report to display a total. The expression used depends on the field and the calculation you want to perform.
If the numeric field is named FeePaid,
use this Control Source expression:
=Sum([FeePaid])
The expression calculates the sum of FeePaid values within the applicable report or group scope.
A grand total summarizes all applicable records in the report. For example, it can show the total fees paid by every student included in the report.
=Sum([FeePaid])
When placed in the Report Footer, this expression generally displays the sum for the report's records.
Group totals calculate values separately for each group in a report. For example, a course-wise fee report can display the total fees paid by students in each course.
| Course | Student | Fee Paid |
|---|---|---|
| ADCA | Rahul Kumar | ₹5,000 |
| ADCA | Amit Kumar | ₹3,000 |
| Tally Prime | Priya Singh | ₹4,000 |
ADCA Total: ₹8,000
Tally Prime Total: ₹4,000
Grand Total: ₹12,000
=Sum([FeePaid]).The total is calculated separately for each group when the text box is placed in the appropriate group footer.
The Count function is useful when you want to display the number of students, employees, orders, or other records.
=Count([StudentID])
This counts non-null StudentID values in the applicable report or group scope.
=Count([StudentID]).You can use aggregate functions to calculate other useful summary values in a report.
=Avg([Marks])
Calculates the average of the non-null Marks values in the applicable scope.
=Max([FeePaid])
Finds the highest FeePaid value.
=Min([FeePaid])
Finds the lowest FeePaid value.
Grouping and aggregate functions can be combined to create detailed summaries.
=Count([StudentID]).| Course | Student Count | Total Fee Paid |
|---|---|---|
| ADCA | 2 | ₹8,000 |
| Tally Prime | 1 | ₹4,000 |
| Grand Total | 3 | ₹12,000 |
These values are illustrative and based on the sample records shown in this lesson.
Formatting helps users identify totals quickly. You can format total controls in the same way as other report controls.
Possible solution: Check the field name, Control Source expression, and report's record source.
Possible solution: Check which records are included in the report and whether the total control is placed in the correct report or group section.
Possible solution: Count ignores null values in the specified field. If necessary, use a field that contains a value for every record, such as a primary key.
Possible solution: Verify that the report contains records and that the source field contains suitable values.
Possible solution: Check the grouping configuration and ensure the total control is in the intended Group Footer rather than an unrelated section.
Create a student fee report that displays individual payments, course-wise totals, and a grand total.
rptFeeSummary.1. Which function calculates the sum of numeric values?
2. Which function counts non-null values in a field?
3. Where is a grand total commonly placed?