Skip to content
IGCSE·Tuition
ICT · Lessons

Group a report without hiding required values

Grouping makes a report neater, and it is easy to tidy away the very values the task asked you to show.

On this page
  1. How do you group safely?
  2. Worked example
  3. The mistake to watch for
  4. Check yourself
  5. Where this leads next

Grouping a report means arranging records under shared headings and adding counts or subtotals for each heading. The safe version keeps every required field visible, and the unsafe version collapses the report to summary rows only.

This lesson is part of database queries and reports and builds on sorting with a secondary key, because groups usually follow a sort.

How do you group safely?

  1. List the fields the task requires in the report.
  2. Choose the grouping field and sort by it first.
  3. Add the summary values the task asks for: count, sum or average, for each group and overall.
  4. Keep the detail rows unless the task says to show the summary only.
  5. Tick each required field off in the finished report.

Worked example

Using the invented Harbour Hill Clubs table from the module page.

Task: group by Club. Show Name, Year and Fee for each member. Add the number of members and the total fee for each club, and a grand total of fees.

Step 1, group and sort: Chess, Drama, Robotics.

Step 2, Chess: Aiman, Dewi, Hui, Imran. Four members. Fee total 30 + 30 + 30 + 30 = 120.

Step 3, Drama: Bella, Chen, Gopal. Three members. 45 + 45 + 45 = 135.

Step 4, Robotics: Evan, Farah, Jia. Three members. 60 + 60 + 60 = 180.

Step 5, grand total: 120 + 135 + 180 = 435. A second check: 4 members at RM30, 3 at RM45 and 3 at RM60 gives 120 + 135 + 180 again, so 435.

The ten detail rows stay on view under their three headings, along with the three subtotals and the grand total.

The mistake to watch for

Switching the report to summary only:

The report shows Chess 4 and 120, Drama 3 and 135, Robotics 3 and 180, and nothing else.

The totals are right, but Name, Year and Fee for each member have vanished.

The task asked for them, so marks are lost. The correction is to turn the detail rows back on. A related slip is to forget the grand total, so tick off every item in the task list at the end.

Check yourself

1. Group by Year. Give the count and fee total for each year.

Show answer

Year 9: Dewi, Gopal, Jia, so 3 members and 30 + 45 + 60 = 135. Year 10: Aiman, Chen, Farah, Imran, so 4 members and 30 + 45 + 60 + 30 = 165. Year 11: Bella, Evan, Hui, so 3 members and 45 + 60 + 30 = 135. Grand total 435 (135 + 165 + 135).

2. What is the average number of sessions for each club?

Show answer

Chess: (8 + 11 + 10 + 12) / 4 = 41 / 4 = 10.25. Drama: (12 + 9 + 6) / 3 = 27 / 3 = 9. Robotics: (12 + 7 + 5) / 3 = 24 / 3 = 8.

3. A grouped report shows Robotics with a count of 2. What should you check first?

Show answer

The source table has 3 Robotics members, so a record is missing from the report. Check for a leftover filter or criteria, then re-run and compare with the source. This is the method in comparing displayed results with the source.

Where this leads next

Finish the module with comparing displayed results with the source dataset, then try the practice set. The ICT practical task and evidence checker can help you tick requirements off.

Reports that tick every box take habit, and our teachers can build it with you in online one-to-one ICT tuition.

Questions people ask

What does grouping a report do?

It collects records that share a value, such as the same club, under one heading and lets you add a count or a subtotal for each group. The detail rows can stay visible underneath. Whether the detail rows stay is controlled by a setting, so check it.

What is the difference between a subtotal and a grand total?

A subtotal is the total for one group, such as all fees in the Chess club. A grand total is the total for every record in the report. A task that asks for a total for each club and an overall total needs both.

Should the group field appear in each detail row?

Only if the task asks for it. Many layouts show the group value once in a heading, so repeating it adds clutter. If the task lists the fields required, make sure each appears somewhere readable, either in the heading or in the rows.

Updated:

Your next step

If your grouped reports look tidy but you are unsure whether every required item is still visible, a one-to-one teacher can review them against the wording of the task with you.

Paid one-hour trial at your assigned teacher’s confirmed rate, starting from RM80. Other fees, schedules and ongoing arrangements are confirmed directly with your teacher after the trial class.

Tuition is arranged with a parent or guardian. Send them this page on WhatsApp and they can enquire for you.

Parent or guardian? Enquire here

9,000+ students helped through our service