Group report/totaling


G

Guest

I have set up group report based on an attendance register. So;

I have [EmployeeName], [RegularHrs], [VacationHrs] etc.

I have a group report grouped by [EmployeeName]
Then in the detail section I have [RegularHrs], [VacationHrs] set to hidden.

In a created Employee Footer I have [=DSum([RegularHrs]),
[=DSum([VacationHrs])

My problem arises here. The sum function is totaling all records instead of
just the one in the group. Any suggestions would be greatly appreciated.
 
Ad

Advertisements

R

Rick Brandt

Roby said:
I have set up group report based on an attendance register. So;

I have [EmployeeName], [RegularHrs], [VacationHrs] etc.

I have a group report grouped by [EmployeeName]
Then in the detail section I have [RegularHrs], [VacationHrs] set to
hidden.

In a created Employee Footer I have [=DSum([RegularHrs]),
[=DSum([VacationHrs])

My problem arises here. The sum function is totaling all records
instead of just the one in the group. Any suggestions would be
greatly appreciated.

Sum() not DSum().
 
G

Guest

I tried that initially and the same result happened. I don't get it, for some
reason it is totalling for the whole table and not just the group. Is using
an "Employee Footer" the correct footer to use?

Rick Brandt said:
Roby said:
I have set up group report based on an attendance register. So;

I have [EmployeeName], [RegularHrs], [VacationHrs] etc.

I have a group report grouped by [EmployeeName]
Then in the detail section I have [RegularHrs], [VacationHrs] set to
hidden.

In a created Employee Footer I have [=DSum([RegularHrs]),
[=DSum([VacationHrs])

My problem arises here. The sum function is totaling all records
instead of just the one in the group. Any suggestions would be
greatly appreciated.

Sum() not DSum().
 
R

Rick Brandt

Roby said:
I tried that initially and the same result happened. I don't get it,
for some reason it is totalling for the whole table and not just the
group. Is using an "Employee Footer" the correct footer to use?

Aggregate functions will aggregate the records within the scope of where
they are used. In a Report Header/Footer they will aggregate all records in
the report. In a Group Header/Footer they will aggregate over the records
contained in each Grouping.

If you are not getting that behavior then you either have the control in the
wrong section or you are grouping on the wrong field(s).
 
G

Guest

Ahhh I see. So all I can total in the EmployeeName group header are employee
names,lol. So I must put every field in a group to get a group footer for it,
then total it that way?? Don't think that'll work, let alone fit on the page.
No other way ey, other than just creating reports on each individual employee?
 
R

Rick Brandt

Roby said:
Ahhh I see. So all I can total in the EmployeeName group header are employee
names,lol.

That is not what I said. What I mean is that if you create a group
header/footer based on EmployeeName and then in either of those sections use an
aggregate function then that function will aggregate whatever field you use in
the function over the number of rows that occur Per-Group.

EX: if the first employee grouping has five records then Count(*) in the group
header or footer will return the number 5. If the second employee has 100
records then that function will return 100.
So I must put every field in a group to get a group footer for it,
then total it that way??

No. See above.
 
Ad

Advertisements

G

Guest

Worked, thank you very much!!!

Rick Brandt said:
That is not what I said. What I mean is that if you create a group
header/footer based on EmployeeName and then in either of those sections use an
aggregate function then that function will aggregate whatever field you use in
the function over the number of rows that occur Per-Group.

EX: if the first employee grouping has five records then Count(*) in the group
header or footer will return the number 5. If the second employee has 100
records then that function will return 100.


No. See above.
 

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