Sort by summed field

C

CW

I have a table with all our orders and the various invoices that have been
created, sometimes several per order.
I created a query to gather the values that I need and based a report on the
query.
In the report I am grouping by OrderNo and summing by Revenue.
So my reports lists all the orders with the total revenue for each of them.
I want to show them in ascending order of revenue but from previous posts I
gather that this is not possible within the report - I must do it within the
query?
If my query has the following fields, what kind of calculated field do I
need to construct, to get the sum of invoices per order and then sort this?
OrderNo, Name, InvNo, InvValue
Remembering that each order can have several invoices...
Many thanks
CW
 
D

Duane Hookom

You can create a separate totals query that groups by OrderNo and sums
revenue. Then add this query to your report's record source query and join
the OrderNo fields. Drop the SumOfRevenue field into the grid so it is
available for sorting in the report design.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top