Link to home
Start Free TrialLog in
Avatar of gcgcit
gcgcit

asked on

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
Avatar of mbizup
mbizup
Flag of Kazakhstan image

Reports have a seperate Sorting and Grouping feature that may appear to override the ordering in your query.

I would check there...
ASKER CERTIFIED SOLUTION
Avatar of mbizup
mbizup
Flag of Kazakhstan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gcgcit
gcgcit

ASKER

You're a genius thanks... that's exactly where it was.  The person who originally made the report sorted by last name in there!

 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.