Very Odd Grouping

TastyWheat

Registered User.
Local time
Today, 10:34
Joined
Dec 14, 2005
Messages
125
I'm using two tables to make a "guest list" report. One table has general reservation info including a guest name. The other table has info on each guest's children. So one reservation (guest) can can have 1 to 6 children.

I have a query setup that joins each reservation and each child based on a reservation ID. So if one person has 2 children that person's name will show up 2 times. Something like:

Code:
Guest Name   | Child Name
-----------------------
John Doe     | Jimmy Doe
John Doe     | Jason Doe
John Smith   | Jerry Smith
John Smith   | Jacob Smith

Now I would expect that if I group the report by first and last name (each has it's own header) the sub-header would contain a list of the children of that guest. What I'm observing is that the list of children is being shown based on first name only. So I see something like this:

Code:
John Doe
--------
Jimmy
Jason
Jerry 
Jacob

If you didn't notice what's wrong, John Doe only has 2 children but the report shows he has 4. Again, I think it's because the other children's parent has the same first name.
 
Okay, okay, before anyone thinks too hard about this I fixed that problem. I grouped the records by Last Name, First Name, and Reservation ID (in that order). So each child is with their correct parent and the parents are listed by last name then by first name.

I also had a problem of records being split up (showing some children on one page and the rest on the next page). I got around that by selecting "Whole Group" under the Keep Together option of Sorting and Grouping.

All is well.
 
Just as a side note to you, or anyone else, you could have created a concatenated field in the query and grouped on that for Last Name, First Name.
 

Users who are viewing this thread

Back
Top Bottom