Sum function for week

  • Thread starter Thread starter Ian Tranter
  • Start date Start date
I

Ian Tranter

I have a report that shows how long someone has been on
site & how much time has been productive / none
productive.

The groupings for the report are
datDATE Header + footer grouped by Week
Employee ID, Header + footer grouped by each value
datDATE, footer grouped by Day
datDATE, no Head / Footer Grouped by Day ascending

The report seems to add all the productive / none
productive times correctly, I have managed to add all the
time on site as there could be possibly 2 or three
booking for any one day using the following calc "=Sum
([Hrs On Site])/(Count([datDATE]))" attached to a text
box named DYSUMOS.
My problem is how do I summarise it in the week footer?
I tried = Sum([DYSUMOS]) attached to a text box control
but each time I run the report I get asked for a
parameter value????
 
Ian said:
I have a report that shows how long someone has been on
site & how much time has been productive / none
productive.

The groupings for the report are
datDATE Header + footer grouped by Week
Employee ID, Header + footer grouped by each value
datDATE, footer grouped by Day
datDATE, no Head / Footer Grouped by Day ascending

The report seems to add all the productive / none
productive times correctly, I have managed to add all the
time on site as there could be possibly 2 or three
booking for any one day using the following calc "=Sum
([Hrs On Site])/(Count([datDATE]))" attached to a text
box named DYSUMOS.
My problem is how do I summarise it in the week footer?
I tried = Sum([DYSUMOS]) attached to a text box control
but each time I run the report I get asked for a
parameter value????

RIght, the aggregate functions only know about fields in the
report's record source table/query. They do not understand
controls in a form/report.

To Sum in a group footer, you have to use the same
expression you used in the control you want to sum. That
is, each level of group footer and the report footer should
use:
=Sum([Hrs On Site])/(Count([datDATE]))
 
Back
Top