Re: Subtotals in reports
- From: Marshall Barton <marshbarton@xxxxxxxxxx>
- Date: Wed, 12 Oct 2005 00:26:19 -0500
wizard_chef wrote:
>I have a problem that is probably due to a poorly designed set of
>tables, but now I have a rather large set of data in the database that
>I do not wish to disturb. This is a typical customer-purchase database
>similar to the one in Northwind. The snarl comes in the way shipping is
>handled. If a customer makes 3 purchases that are shipped, each entry
>in the OrderDetails contains the shipping charge. This means any query
>that pulls out a subset of the orders will show shipping on each item
>in a shipment.
>
>I am trying to design a report that shows for each purchase date and
>for each customer on that date, an itemized list of the items, thier
>cost (quantity*unitprice), and the shipping.
>
>I have tried severals ways to group the report, and the closest I can
>get is to have a footer on the purchase date, since any purchase by the
>customer on a given date will be logged as a single shipment (hence,
>single shipping charge). I can get the subtotals for each date
>(customer, item, cost, etc.) to work fine. When I try to get a report
>total, if I use =sum([quantity*unitcost])+freight, it undercounts the
>freight charges. If I use -sum([quantity*unitcost]+freight), it
>overcounts the freight cost.
>
>If I could simply sum the subtotals, I would have the correct answer,
>but since these are calculated, I can't do that. I also cannot think of
>a way to modify the query to make the task easier.
Add a text box named txtRunFreight to the purchase date
footer section. Set its control source to Freight and
Running Sum property to Over All.
Then the report footer can display the grand total by using
the expression:
=Sum([quantity*unitcost]+txtRunFreight
--
Marsh
MVP [MS Access]
.
- Follow-Ups:
- Re: Subtotals in reports
- From: wizard_chef
- Re: Subtotals in reports
- References:
- Subtotals in reports
- From: wizard_chef
- Subtotals in reports
- Prev by Date: Re: Access 2003 : Problem retrieving Printer Information on Networked printer
- Next by Date: Re: close report when there is no data to display
- Previous by thread: Subtotals in reports
- Next by thread: Re: Subtotals in reports
- Index(es):
Relevant Pages
|
Loading