Can I do a calculation in a report?

G

Guest

I would like to do a calculation in a report based off another calculation I
already done in a field.
Example:
Total amount:[table 1].[field 1]*[table 2].[field 2]
I would like to use that calculation in a new field in a report like this.
grand total: [total amount]*[table 3].[field 3]

Can this be done in a report? I tried it in a query and I get data type
mismatch no matter if I use sum, expression or group by. What is a work
around for this? Thanks in advance
 
J

Jeff Boyce

So, if you tried this in a query and Access told you the fields you were
using didn't match in data type, why do you think they will match in a
report instead of a query?

Re-check the data types for the three fields you are working with ... are
they all the same?

And in a report, should you decide to do the calculation there, you'll need
to embed the full calculation in the subsequent calculations. If I remember
correctly, Access won't use your [total amount] field (because it is built
on the fly in the report, but would use the ([t1]![f1]*[t2]![f2])*
calculation you use to get the total.

* abbreviated to save my old tired fingers...<g>

Regards

Jeff Boyce
Microsoft Office/Access MVP
 

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