View Full Version : Calculations with specific records


miccom09
01-30-2009, 09:31 AM
Hi

I have a database with the following field names, and would like to sum totals for specific records. The field names I have are :

CompanyName OrderNo date QtyOrdered
a 100
b 500
c 1500
d 700
b 250
e 390
f 1209
a 100
g 300

I would like to sum QtyOrdered for CompanyName "a" "d" & "g", In a report. (So the answer should be 100+700+300 = 1100). I have to do this repeatedly in my report for different company groupings. So it would help to know how?

Can someone please help me ? Can I use an unbound box in a report to do this? If so what is the equation I would write?

Any help would be appreciated.
Thanks

ajetrumpet
01-30-2009, 09:36 AM
Yes, an unbound box would be best. You can use the expression builder to sum a field in your report too. Try the expression builder first for the actual field in the report, but you could also use a DSum function for the query that is the source of the report. Something like:= DSum("field", "query")