• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 267
  • Last Modified:

Sorting on Report

I have a query that is the datasource for a report.  When I run the query and look at the data the criteria to sort by Payment (descending).  When I run the report, it's sorted alphabetically by person's last name and doesn't sort by Payment.  See screenshots.  

The button that calls the report is very simple:

    Dim stDocName As String

    stDocName = "rptRegistration"
    DoCmd.OpenReport stDocName, acPreview

I also checked to make sure the Report doesn't have code on the OnLoad that would sort.

Where else could I look to find filters that would be overiding my report sort order?

ee-query-sort.JPG
ee-report-datasource.JPG
0
gcgcit
Asked:
gcgcit
  • 2
1 Solution
 
mbizupCommented:
Reports have a seperate Sorting and Grouping feature that may appear to override the ordering in your query.

I would check there...
0
 
mbizupCommented:
You can get to that feature by right-clicking the little grey square in the upper left hand corner of your report in design view, and selecting 'Sorting and Grouping'.
0
 
gcgcitAuthor Commented:
You're a genius thanks... that's exactly where it was.  The person who originally made the report sorted by last name in there!
0
 
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:

 Just as an add on comment, reports by design ignore any sorting in the data they are based on as they need to control that in order to do things like group levels and totaling.

  They could not provide those features if they relied on the underlying datasource to do the sorting.

Jim.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now