Count the number of group (headers) in a report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to count the total number of groups. For example, if I group on a
patient ID and then show some detail about the patient, how many patients did
I so list. What I tried was to create a text field that sums over the group
and set the control source to =+1. I figured in the group footer, I'd include
a text field that would show the highest value. This worked for smaller
groups, but for a large group, it counted great until 99, and then the value
became +02. The group footer ended up showing 5E. Kindly help me find the
correct technique.
 
It sounds as if your control is not wide enough to display the number and is
resorting to scientific notation in order to try to display the value.

Try making the control wider.
 
Hi Richard,

you can do this with code behind the report. First, you
need to create a global variable that will accumulate the groups

Then, you need to increment that variable each time a new
group is reported (OnFormat of Group header is a good place)

Finally, at the bottom of the report, you can write your
global variable to a control

here is a link you can use for an analogy

Have an awesome day

Warm Regards,
Crystal
 
John,

Yes, that was all it was. Sorry I didn't think of that (so simple) but thanks.
Crystal - I'll keep your method on file and thanks to you too.
 
Hello Crystal,

I'd like to use your method, but don't see the link to example that you
mention. Thanks...Richard
 
Back
Top