Sum in a report

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

Hi,
Not sure what I'm doing wrong, so here's my question...
In a Report's Detail I have a calculated field to find out someones's
commissions:
=QTY*(commission_rate/100)
This line work fine for me and return, for a given period of time, the
commisions earned.
What I cannot figure out is HowTo total them.
I tried
subtotal: =QTY*(commission_rate/100)
and then in the page footer I say
=sum([subtotal])
but it doesn't work.
Can someone tell me where the problem is?
TIA
Mike
 
Hi Mike.
Instead use =Sum(QTY*(commission_rate/100))in the group
footer.
Hope this helps.
Fons
 
Mike said:
Not sure what I'm doing wrong, so here's my question...
In a Report's Detail I have a calculated field to find out someones's
commissions:
=QTY*(commission_rate/100)
This line work fine for me and return, for a given period of time, the
commisions earned.
What I cannot figure out is HowTo total them.
I tried
subtotal: =QTY*(commission_rate/100)
and then in the page footer I say
=sum([subtotal])
but it doesn't work.


First of all, the Page Header/Footer sections do not permit
the use of aggregate functions (Count, Sum, etc).

You can only use the aggregate functions in a group
header/footer or in the Report Header/Footer.

The aggregate functions operate on fields in the report's
record source table/query, not on controls in the report.

Putting all that together, you can get a group's subtotal by
using this in the group's header/footer:

=Sum(QTY*(commission_rate/100))
 
Thank you.
However, I need to complicate the formula a bit.
Now, the actual field is composed of the following formula:
=If(CLIENT_ACTIVE=1,QTY*(commission_rate/100),'')
I'm checking the activity of a client; if not active, commissions will not
be paid.
Said that, how would I total the resoults?
Mike


Fons Ponsioen said:
Hi Mike.
Instead use =Sum(QTY*(commission_rate/100))in the group
footer.
Hope this helps.
Fons
-----Original Message-----
Hi,
Not sure what I'm doing wrong, so here's my question...
In a Report's Detail I have a calculated field to find out someones's
commissions:
=QTY*(commission_rate/100)
This line work fine for me and return, for a given period of time, the
commisions earned.
What I cannot figure out is HowTo total them.
I tried
subtotal: =QTY*(commission_rate/100)
and then in the page footer I say
=sum([subtotal])
but it doesn't work.
Can someone tell me where the problem is?
TIA
Mike


.
 
How are you determining the "Active status", if this is a
checkbox, or a yes status, the result actually will be -1
(minus 1).
Second the formula would be
=IIF(CLIENT_ACTIVE=1,QTY*(commission_rate/100),'')
Hope this helps.
Fons
-----Original Message-----
Thank you.
However, I need to complicate the formula a bit.
Now, the actual field is composed of the following formula:
=If(CLIENT_ACTIVE=1,QTY*(commission_rate/100),'')
I'm checking the activity of a client; if not active, commissions will not
be paid.
Said that, how would I total the resoults?
Mike


"Fons Ponsioen" <[email protected]> escribió en el mensaje
Hi Mike.
Instead use =Sum(QTY*(commission_rate/100))in the group
footer.
Hope this helps.
Fons
-----Original Message-----
Hi,
Not sure what I'm doing wrong, so here's my question...
In a Report's Detail I have a calculated field to find out someones's
commissions:
=QTY*(commission_rate/100)
This line work fine for me and return, for a given
period
of time, the
commisions earned.
What I cannot figure out is HowTo total them.
I tried
subtotal: =QTY*(commission_rate/100)
and then in the page footer I say
=sum([subtotal])
but it doesn't work.
Can someone tell me where the problem is?
TIA
Mike


.


.
 
Back
Top