By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,660 Members | 1,579 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,660 IT Pros & Developers. It's quick & easy.

Total on report blows sorting

P: n/a
Hello All,

I have a report based upon a query. I have added a control to report
footer that calcs the total cost of the inventory: =SUM([inv_cost]).

When this total calculation is NOT on the report, the report displays
as it should in ascending order by inventory number (inv_num).

1102
1103
1104
....
....
....
2300

When the total calculation IS on the report, the sort gets messed up.
It is still ascending but does not start with the lowest inv_num.
It'll start about 2/3 through the invetory with the lowest numbered
item appearing about 1 third of the way throught the report:

2052
2053
....
....
....
....
....
2300
1102
1103
1104
1105
....
....
2050
2051

Any thought on why this is happening?

Nov 13 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
A report's Sort property takes precedence over the record source's sort
order. Sounds like you may have an unintended group and/or sort property in
the report. Select "View - Sorting and Grouping" to check and edit as
necessary.
-Ed
"Mike" <mm****@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Hello All,

I have a report based upon a query. I have added a control to report
footer that calcs the total cost of the inventory: =SUM([inv_cost]).

When this total calculation is NOT on the report, the report displays
as it should in ascending order by inventory number (inv_num).

1102
1103
1104
...
...
...
2300

When the total calculation IS on the report, the sort gets messed up.
It is still ascending but does not start with the lowest inv_num.
It'll start about 2/3 through the invetory with the lowest numbered
item appearing about 1 third of the way throught the report:

2052
2053
...
...
...
...
...
2300
1102
1103
1104
1105
...
...
2050
2051

Any thought on why this is happening?

Nov 13 '05 #2

P: n/a
I verified there are no Grouping.Soirting properties set. As I said,
without the text box with =SUM([inv_cost]), the sort is fine, acsending
by inv_num. With the addition of the =SUM([inv_cost]) in the report
footer, sorting turns bad.

Thanks

-Mike M

Nov 13 '05 #3

P: n/a
On 22 Feb 2005 06:42:02 -0800, "Mike" <mm****@gmail.com> wrote:
Hello All,

I have a report based upon a query. I have added a control to report
footer that calcs the total cost of the inventory: =SUM([inv_cost]).

When this total calculation is NOT on the report, the report displays
as it should in ascending order by inventory number (inv_num).

1102
1103
1104
...
...
...
2300

When the total calculation IS on the report, the sort gets messed up.
It is still ascending but does not start with the lowest inv_num.
It'll start about 2/3 through the invetory with the lowest numbered
item appearing about 1 third of the way throught the report:

2052
2053
...
...
...
...
...
2300
1102
1103
1104
1105
...
...
2050
2051

Any thought on why this is happening?


Are you expecting the results to be sorted using an ORDER BY in the underlying
query? That won't work on a report that has groups or sums. If your report
has any grouping at all or has an aggregate in the report footer, you must use
the report Sorting and Grouping to control the order of output.
Nov 13 '05 #4

P: n/a
Thanks for the explanation. I'll try it right now.

Thanks a lot

Nov 13 '05 #5

P: n/a
"Mike" wrote
I verified there are no Grouping.Soirting
properties set.
The Report's Sorting and Grouping are the ONLY thing that determine the
order in which information is displayed in a Report. The order of
information in the RecordSource is immaterial.
As I said, without the text
box with =SUM([inv_cost]), the sort is fine,
acsending by inv_num. With the addition
of the =SUM([inv_cost]) in the report
footer, sorting turns bad.


It was just happenstance that you got the order you wanted (it has to be
displayed in some order, and that was "convenient" for Access, but the
documentation says you must use Sorting and Grouping), and, as you
demonstrated, most anything can interfere with that order.

Try using the Report's Sorting and Grouping to specify sorting by the field
you want and see if that does not fix your problem.

Larry Linson
Microsoft Access MVP

Nov 13 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.