Calculation error

D

Deb

I have a report with a calculation problem. The report is
based on a query that has several tables. The first table
is an orders table with a freight charge field. This table
is linked to an order details table. I need the freight
charge to calculate only once for each order while still
showing the underlying detail. In my report, I need to
combine multiple orders, showing a total freight. My
problem is that the freight charge is being added to every
record in the order details instead of being added to each
record in the main orders table. Any ideas?
 
D

Duane Hookom

Add a text box in your Order header.
Name: txtFreightRS
Control Source: [FreightCharge]
Running Sum: Over All
Visible: No
Add a text box to the report footer section
Control Source: =txtFreightRS
 
M

Marshall Barton

Deb said:
I have a report with a calculation problem. The report is
based on a query that has several tables. The first table
is an orders table with a freight charge field. This table
is linked to an order details table. I need the freight
charge to calculate only once for each order while still
showing the underlying detail. In my report, I need to
combine multiple orders, showing a total freight. My
problem is that the freight charge is being added to every
record in the order details instead of being added to each
record in the main orders table. Any ideas?


The text box in the order footer section can total the
details plus the freight by using the expression:
=Freight + Sum(cost)

Also in the group footer, add a text box named
txtRunFreight. Bind it to the Freight field and set its
RunningSum property to Over All. Then the report footer can
display the total freight in a text box with the expression
=txtRunFreight
 

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