Counting Records in the First Level Group

khwaja

Registered User.
Local time
Today, 20:52
Joined
Jun 13, 2003
Messages
254
In my report, I have a region, within which I have several projects, and each project has various cost parameters. My report works fine in getting costs summed up at all levels. The only thing I am unable to achieve is to count the number of projects at region level. My efforts to count results in all lines appearing under each project. I gave tried Region Footer but no luck. Will appreciate some help.
 
AK,

To count the number of groups on a report:

1. Add a control to the header or footer of the group to be counted and name it something like txtGroupCount. Make the control invisible, set its control source to =1, and set its Running Sum property to Over All. This effectively generates a running count of the number of groups.

2. In the report footer, add a control with a Control Source of =[txtGroupCount]. This displays the value of txtGroupCount as of the last group that occurs in the report at which time it is equal to the number of groups in the report.


Note that the group count can only be displayed in the report footer (not the header) since that is the only point at which txtGroupCount contains a value equal to the total number of groups.

This technique can be modified to show the number of groups within the group immediately surrounding the group to be counted by setting the Running Sum property of the first control to Over Group, and placing the second control in the surrounding group's footer instead of the report footer.

Hope this helps ...
 
Appeciate your help. After putting the txt box in the project header and the summing text box in region footer, I got the result I wanted. Many thanks for your help.
 
just one complication, the total in successive group summaries is being incremented by the total of previous group break. Any fix?
 
Thanks for the "mind" refresh - I was so close but I just couldn't remember exactly how to do this.
 

Users who are viewing this thread

Back
Top Bottom