Sorting and Grouping

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have query that shows items and their sales totals (can have an item listed
more than once). I'd like my report to group items together with a total of
the sales for that item to appear also, sorted in descending order.
 
How far have you gotten with this? Did you find the Sorting and Grouping
dialog?
 
I've created the query and the report. For sorting and grouping, I have
"Item" in the first Field Expression field, sorting in descending order. The
items are all grouped together, but their totals are listed separately under
the item. I'd like these totals lumped together in one sum, sorted in
descending order.

Duane Hookom said:
How far have you gotten with this? Did you find the Sorting and Grouping
dialog?
 
Provide some sample output. I don't know what you mean by "I'd like these
totals lumped together in one sum, sorted in descending order". If this
means a section of the report with just the totals then you will need to
create a subreport.

--
Duane Hookom
MS Access MVP
--

denilynn said:
I've created the query and the report. For sorting and grouping, I have
"Item" in the first Field Expression field, sorting in descending order.
The
items are all grouped together, but their totals are listed separately
under
the item. I'd like these totals lumped together in one sum, sorted in
descending order.
 
Here's what I have:

Item
A
B
A
A
C

Duane Hookom said:
Provide some sample output. I don't know what you mean by "I'd like these
totals lumped together in one sum, sorted in descending order". If this
means a section of the report with just the totals then you will need to
create a subreport.
 
Here's what I have:

Item Description Sales
A Cat $100
B Dog $ 25
A Cat $ 50
A Cat $ 75
C Horse $200

I'd like the Items combined under one heading on my report, i.e., "A", "B",
"C" with the grand total sales for each. I'd also like the sales listed in
descending order, i.e., B-Cat-$225; C-Horse-$200; B-Dog-$25.
 
Create a separate totals query that Groups By Item and totals Sales. You can
then add this totals query to your report's record source. Join the Item
fields and add the SumOfSales to the query grid. You can then Sort by
-SumOfSales Descending
-Item Ascending

If you need anything different then take the time to type in exactly how you
expect your data to look in the report rather than describing it in a couple
sentences that can easily be mis-interpreted.
 
Back
Top