Summing in Groups

R

Rob HDR

I am trying to calculate the percentage of people in a group (group name is
Section) that have taken a particular training class. The field, txtClass,
has a value of 'Y' or 'N'. Here's the approach I took:
-I created a non-visible field in the Detail section named cntTaken. I set
the RecordSource of cntTaken to: =IIf([txtClass]='Y',1,0)
-In the Section Header, I created a field named Compliance with the
RecordSource of: =Sum([cntTaken])/Count(*)

When I run the report, it asks for a parameter value for cntTaken????
I then tried changing the cntTaken to a running sum over group. And changed
the RecordSource of Compliance to =[cntTaken]/Count(*). Now I'm not
requested a parameter value for cntTaken, but all values are 0.

I have looked the syntax over and over and can't figure it out. Please HELP.
Thanks,
 
K

Klatuu

You don't Sum a control name, you have to Sum a field in the report's record
source. Also, you have to define what you are counting.
=Sum([txtClass])/Count([txtClass])
 

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