Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

order by not working correctly

Status
Not open for further replies.

jebushatescats

IS-IT--Management
Jun 6, 2006
37
0
0
CA
Hello all I have a report who's data is based on a query. The query contains the following order by clause
ORDER BY Dept,
SupervisorName,
EmpName

When I execute the query the records appear in the order that I want.
My problem is that the report does not display the records in the same order. I have listed the above fields in the sort and group window in the same order that they appear in the ORDER BY statement in the query. I also require that the report break to a new page on EmpName so I have set the EmpName group header to force new pafe before section.
So the reports orders by Dept correctly bu the Supervisor and EmName are not in the correct order.

Have I missed something?

 
Boy am I dim witted this morning, after posting I went back and took a look at what I did and realized I did not have the fields in the sort and group the same as the fields in the ORDER BY clause of my SQL, problem solved!!
 
As you found the Sorting and Grouping in a report is not driven by the sort order of the query, it's a separate module within the report that controls that. Glad you figured it out though!

Leslie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top