472,328 Members | 973 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,328 software developers and data experts.

Total on report blows sorting

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
5 1809
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
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
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
Thanks for the explanation. I'll try it right now.

Thanks a lot

Nov 13 '05 #5
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Richard Holliingsworth | last post by:
Hello: Thanks for reading this. I would like to build a report (Access 2002) that uses SQL queries to count records in specific groups. ...
6
by: Mike MacSween | last post by:
I have a report based on: PARAMETERS Forms!frmProductions!ProdID Long; SELECT Sum(qryRoleEvent.Fee) AS SumOfFee, First(qryMusician.LastName) AS...
3
by: ahaque38 | last post by:
Hello. Using A2K SP3, I am having the following problem with a report using "Sorting and Grouping". I have recently added a grouping in the...
11
by: James P. | last post by:
Hello, I have a report with the Priority field is used as sort order and grouping. The problem is the data in this Priority field if sorted in...
8
by: Mike MacSween | last post by:
tblCourses one to many to tblEvents. A course may have an intro workshop (a type of event), a mid course workshop, a final exam. Or any...
7
by: manning_news | last post by:
I've got a report that's not sorting correctly. I build a SQL statement and assign it to the recordsource in the Open event, sorting the data the...
4
by: ApexData | last post by:
I have one table used to maintain information on Service Events. Each record contains a Repair, Maint, and Battery checkbox (bound/boolean). Any...
4
by: Jana | last post by:
Hi! I have an Access 97 report based on tables linked to an SQL back end. The report has 5 subreports in it (unfortunately unavoidable due to the...
8
by: sara | last post by:
Hi - I have looked at all posts and tried both Allen Browne's Report Sorting at run Time ( Select Case Forms!frmChooseSort!grpSort Case 1 'Name...
0
by: tammygombez | last post by:
Hey everyone! I've been researching gaming laptops lately, and I must say, they can get pretty expensive. However, I've come across some great...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
1
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.