Same query sorted on the ID showing correct Order on a Form and a Report but reversed order in a 2nd Report.

Issa S.
Issa S. used Ask the Experts™
on
Hi all,

Same query sorted on the ID showing correct Order on a Form and a Report but reversed order in a 2nd Report.

I have a query having a sort order on the ID giving correct data when Viewed.
It is the source for a Form and Two Reports using the same results.
The Form and The First Report are showing the right data.
The 2nd report is also showing the same data but in Reversed Order!!!.
I checked and checked The SQL and design and I don't see any difference.

Help Please
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Bill PrewIT / Software Engineering Consultant
Top Expert 2016

Commented:
In the second form, could you have an "Order By" property set for the Data source of the report?


»bp

Author

Commented:
Order By is blank,
Order by on Load is Yes.
Filter is bland,   and
Allow filter in No.
Pawan KumarDatabase Expert
Awarded 2016
Top Expert 2016

Commented:
Try setting the order by.
Should you be charging more for IT Services?

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Bill PrewIT / Software Engineering Consultant
Top Expert 2016

Commented:
And the Query specifies a sort on the column you want, in ascending order?


»bp

Author

Commented:
Dear Pawan :

It does not give any option to change the Order By, remember I am talking about the 2nd Report.

To get things worst,  I matched the properties of the 2 reports and they are the same

Deaaar Bill,
Of course on the same field. The ID in both cases.
Bill PrewIT / Software Engineering Consultant
Top Expert 2016

Commented:
Any chance you can upload the Access file that has this problem?


»bp
Distinguished Expert 2017
Commented:
Sort order for a report is not defined in the query.  It is defined in the report.  Look at the sorting and grouping options for the report.
Most Valuable Expert 2015
Distinguished Expert 2018

Commented:
In fact, you should remove any sorting in the query and only specify ordering in the report itself.

/gustav

Author

Commented:
Tell Me How Pls.  My  mind is stuck now.

Report Properties now are:

Order By is blank,
Order by on Load is Yes.
Filter is bland,   and
Allow filter in No.

Author

Commented:
I also Tried : Removing the sorting from the Query and still the same   !!!!!!!!
Most Valuable Expert 2015
Distinguished Expert 2018
Commented:
In report design, go to grouping and sorting and define the ordering you wish.

/gustav

Author

Commented:
Sorry Bill for being away for a while but I agree on your suggestion to close the issue.
Thanks to ALL who contributed in this.

Author

Commented:
Thanks a lot.
Worked nicely.
Most Valuable Expert 2015
Distinguished Expert 2018

Commented:
You are welcome!

/gustav

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial