sum of calculated fields in header of report

P

Pierkes

Hi,

Question...
I have an access application (access 2007) (client server) with a split
database
(BE on the server en FE on laptop)
I have a rapport in whcih the following things are presen';

1. a header per salesman with the fields;
name salesman
totturnover (totalling fields in the body)

2. a body with a few calculated fields with iif statements e.g.;

field "totbeloning" with :
iif([courtage]<>"";[koopsom]/100*[courtage]+[startkosten];0))

This works fine in the body

My question;
I would like to total the field "totbeloning" per salesman in the header
field "totbelverk".
So the summarized field should be in the header per salesman.
Now, I know you cannot total calculated fields and you have to repeat the
formula in the field in the header (right?).

I then get;
=som(iif([courtage]<>"";[koopsom]/100*[courtage]+[startkosten];0)))

But, when i run the report i get a faulty total bacause it will only total
the record where the field "startkosten" has a number in it. And that is not
allways the case. The rest of the records is skipped in the total.

Problem 2
In the body i have a calculated field with multiple iif statments;

fieldname "omzet"
IIf([courtage]<>"";[koopsom]/100*[courtage];0)+IIf([courtagevastbedrag]<>"";[courtagevastbedrag];0)+IIf([startkosten]<>"";[startkosten];0)

In itself, this works fine in the body !

ofcourse i would like to have a total field, called "omzetverk" in the
header of the salesman
I tried to do this with the formula;

=Sum((IIf([courtage]<>"";[koopsom]/100*[courtage];0)+IIf([courtagevastbedrag]<>"";[courtagevastbedrag];0)+IIf([startkosten]<>"";[startkosten];0)))

When the report is executed it gives an error message statign;
"data do not match the criteriumexpression"

Can somebody help me to get nice totals in the header please ?
THANKS !!!!

Pierre
 

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