Problem with sum function

Soulfly

New member
Local time
Today, 07:49
Joined
Sep 13, 2006
Messages
9
Hello there,

I ran into a problem which is difficult for me to place.
I have generated an report where I have an display of records. For each record I have put in an unbounded control (BTW) where I calculate the VAT for the item. Now I want to calculate the sum of the different values of the BTW as a total, so I put an unbound control on the end of the rapport with the syntax =Sum([btw]) but now it asks for an paramter at the start of the report. does anyone know how to accomplish the sum ? I have doublecheked al the names, they are correct...

thanks in advance
 
You can't create aggregates based on controls. You need to redo the calculation in the Sum().

=Sum(A+B*C)
 
You can't create aggregates based on controls. You need to redo the calculation in the Sum().

=Sum(A+B*C)


Hello Pat, thank you for the anwser but I cant quiet follow you (probably cause I'm dutch ;) ) .

The report displays the following:

Amount : Price : Inc VAt : Ex Vat : VAT amount

The Report is an mulitple records report.

The Amount and Price fields are fields comming out of an table, the INC VAT, EX VAT and VAT Amount are controls (unbound) placed by me on the report.

Now, for each record, the sum for the formula for those three fields are going the right way. But they are al in the same line (in the detail pane) Now I want to multiple the Vat amount for the different records, so that at the end of the report (report footer) al the VAT comes together in an sum. Can you explain me how to do that ?

Thank you again...

Peter
 
Soulfly,

I wonder if you could include the calculated numbers (all 3 VAT amounts) as just fields in a query (so they show up on your report in each record line by default, as a field)??

Then you wouldn't have to sum each and every control on your report. I would think this would be OK, seeing that a VAT number is proportionate to unit volume.
 
Soulfly,

I wonder if you could include the calculated numbers (all 3 VAT amounts) as just fields in a query (so they show up on your report in each record line by default, as a field)??

Then you wouldn't have to sum each and every control on your report. I would think this would be OK, seeing that a VAT number is proportionate to unit volume.

Hi Ajetrumpet,
Thank you for your reply, do you mean that I should include the VAT amount in the query that would be base of the report? SO it is not an unbounded control anymore?

If so, I will give it a try. Things aint working for me now so all help is more than welcome :)
 
If the calculation in the detail field is:
=A+B*C
then the calculation in the footer field is:
=Sum(A+B*C)
rather than
=Sum(detailfield)

As ajetrumpet suggested, doing the calculation in the query will simplify the report since the VatAmount will be a bound field.
 

Users who are viewing this thread

Back
Top Bottom