Grouping and sorting are important features in Microsoft Access reports. Grouping arranges related records into sections, while sorting arranges records in a particular order. These features make reports easier to read, understand, and analyze.
Grouping means arranging records that share the same value in a field. For example, students can be grouped according to their course.
| StudentID | StudentName | Course | City |
|---|---|---|---|
| 101 | Rahul Kumar | ADCA | Aurangabad |
| 102 | Priya Singh | Tally Prime | Patna |
| 103 | Amit Kumar | ADCA | Aurangabad |
| 104 | Neha Kumari | Web Development | Patna |
If you group this data by Course, students enrolled in the same course appear together.
Sorting means arranging records according to a field's values. You can sort names alphabetically, dates chronologically, or numbers by their values.
| Sorting Type | Description | Example |
|---|---|---|
| Ascending | Smallest to largest or A to Z | Amit, Neha, Priya, Rahul |
| Descending | Largest to smallest or Z to A | Rahul, Priya, Neha, Amit |
| Grouping | Sorting |
|---|---|
| Creates sections of related records. | Arranges records in a chosen order. |
| Can group students by Course. | Can arrange students by StudentName. |
| Can support group headers and footers. | Controls the order in which records appear. |
| Useful for department-wise summaries. | Useful for alphabetical or numerical lists. |
You can manage grouping and sorting settings through the report design tools.
The Group, Sort, and Total pane lets you add and manage grouping and sorting levels for the report.
Suppose you want to create a report that displays students separately according to their courses.
101 — Rahul Kumar
103 — Amit Kumar
102 — Priya Singh
104 — Neha Kumari
This is an illustrative example. Your report's exact appearance depends on its layout and grouping settings.
You can sort students alphabetically by StudentName so that users can find names more easily.
| Order | Student Name |
|---|---|
| 1 | Amit Kumar |
| 2 | Neha Kumari |
| 3 | Priya Singh |
| 4 | Rahul Kumar |
Multiple sorting levels allow you to sort records using more than one field.
First, sort students by Course in ascending order. Then, sort students within each course by StudentName in ascending order.
Amit Kumar
Rahul Kumar
Priya Singh
Neha Kumari
The example assumes that Course is grouped in ascending order and StudentName is sorted alphabetically within each group.
Group headers and footers help display information related to a particular group.
A course-wise report may display the course name in the group header and the number of students in the group footer.
A report can display summary information, such as the total fees collected or the number of students in a course.
| Course | Number of Students | Total Fees |
|---|---|---|
| ADCA | 20 | ₹2,00,000 |
| Tally Prime | 10 | ₹40,000 |
| Web Development | 15 | ₹1,50,000 |
The values above are examples only.
To calculate totals, use appropriate aggregate functions and summary controls in the report. The underlying data must contain the fields needed for the calculation.
You can modify or remove a grouping or sorting level when the report requirements change.
Create a course-wise student report with alphabetical sorting.
rptCourseWiseStudents.1. What does grouping do in a report?
2. Which order arranges names from A to Z?
3. Which pane helps manage report grouping and sorting?