Jump to content

report looses sorting option ?


usmc-ratman

Recommended Posts

Thanks in advance for looking at this:

Using Access 2000, have table "ClientList" and table "BillingInfo"

Have created a billing report that reports the clients information (contained in "clientlist" table) in the header, and the time tracking (contained in the "billingInfo" table) in the detail section of the report.

All very simple. First I just created the data source for the report using a select query. Works great, except I've tried to sort the information by the BillingID field (which is the autonumber primary key field of the "BillingInfo" table), and then by date.

When the report is run - the order is descending even though in the select statement it specifies ascending. So I thought, ok I'll beat this - I created a regular query, then based the data source for the report on it.

The query, when run by itself, sorts the information correctly.... When the report uses it, its back to descending order ????

Then I thought, aaaalllrrighttt - I'll create a calculated field in the query, make it abs(BillingID) - which then gives me another field in the query to sort on (just in case it didn't like the idea of sorting by a primary key field), and whaala - the query runs fine by itself - It should work in the report. But no - it does not.

I also created a new query, then saved the query as a report (then just rearranged the titles as I wanted). This worked great - for a day - then when new records were added to the database, it lost the sort order on the report only, for the new data. The older data was still sorting correctly.

How do I get this thing to sort correctly when the report uses the data? Or can the sorting be handled by code placed behind the report?

Any ideas or code to place in there to make sure the data is sorted correctly, or even a suggestion as to why the report is changing the sort order would be greatly appreciated.

Thank you,

John R

Semper FI

Link to comment
Share on other sites


I can't quite compare apples to apples as I no longer have a copy of office 200, but in 2003 when I base the report on a query the data is displayed on the repaort just as it is in the query.

I can think of no reason why 2000 would have been any diferent, except that this is Microsoft we are talking about.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...