Order of table rows switch when added to a sub report (1 Viewer)

rnorthcott

New member
Local time
Today, 14:48
Joined
Dec 2, 2023
Messages
4
Hello everyone!

I am working on updating a reservation database that I created over 10 years ago and am running into a couple client requests I can't figure out. The bulk of the database focuses around entering group reservations for one of Canada's national parks. When saving the group members of each reservation into a table, the order of the group member names match what I entered like this:

visitor names correct order.PNG


However, part of the reservation creation process is to print a receipt for the reservation and any payment received. I have used a sub report to list the visitor names, but the names are in the opposite order than they were entered like this:
visitor names wrong order.PNG

I'm sure there is a simple reason for this that I'm missing, but my client would prefer if the order on the report matches the order entered into the table.

He also is asking about separating records in a different report with a line between each record. I haven't been able to find any information about this online and was wondering if anyone had any insight into if this is possible or not.

Thanks everyone for your help!

Raymond (rnorthcott)
 

isladogs

MVP / VIP
Local time
Today, 20:48
Joined
Jan 14, 2017
Messages
18,229
Tables have no inherent sort order though may often appear in the order of the PK field.
End users should never work with or even open tables so the table order is irrelevant.

Reports give you a lot of options for both sorting and grouping. This needs to be done in the report design view.
Similarly you can format the report to place a line after each record. Again this is done in design view.
 

jdraw

Super Moderator
Staff member
Local time
Today, 15:48
Joined
Jan 23, 2006
Messages
15,379
Some thoughts for consideration---but may not be related to your issue.

Records are placed in a table in an order managed by the database management system. Think of storage in a table similar to a bag of marbles. The marbles are in the bag. It isn't until you retrieve the data(marbles) with a query including a sort order that they come out in the order associated with the Sorted By. Without a Sorted By they may come out in any order.

Reports have their own sorting and grouping parameters - and do not use the sort order if the report is based on a query.
 

rnorthcott

New member
Local time
Today, 14:48
Joined
Dec 2, 2023
Messages
4
Definitely some things to consider. Thanks for your input.
 

rnorthcott

New member
Local time
Today, 14:48
Joined
Dec 2, 2023
Messages
4
adding a sort on the report data for the win. I knew it would be relatively simple. I had seen the group and sort options previously, but had to figure out the correct field to sort on and then ensure it is included in the data source. Thanks for the push in the right direction.
 

Gasman

Enthusiastic Amateur
Local time
Today, 20:48
Joined
Sep 21, 2011
Messages
14,310
Does it really matter that they are shown in the exact order entered?
I would normally sort in alphabetical order when names are involved. Easier to find then.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 15:48
Joined
Feb 19, 2002
Messages
43,280
If you are using an autonumber, sorting by the autonumber will give you a data entry sequence. If that doesn't work, you need to add your own datetime field and sort on that
 

LarryE

Active member
Local time
Today, 12:48
Joined
Aug 18, 2021
Messages
592
He also is asking about separating records in a different report with a line between each record. I haven't been able to find any information about this online and was wondering if anyone had any insight into if this is possible or not.
Reports and forms allow you to draw lines. Use design view. Then you can size them and use other options such as dotted, dashed, solid etc. Hold the Shift key down as you draw it with your mouse to make it straight.
 

Users who are viewing this thread

Top Bottom