Link to home
Start Free TrialLog in
Avatar of csall
csall

asked on

Count number of records on a report then totaling number of records

I have a report that I am creating that I want to count the number of records (permits issued to a construction company), then total them at the end of each section.  It should look like this:

Company A
    Counter 1     -    Road Permit road A
    Counter 2     -    Road Permit road C
     Counter 3     -    Road Permit road D
         Total # road permits = 3

I have the counter working by doing the following:
  * Created a Text box called "Counter" to count the records.  I set the text box as follows:
       - Set Control Source = 1
       - Set Running sum "Over Group"

Now in the detail footer I put in another text box called "Total"  to capture the total records.  I set the following on the text box:
       - Set Control Source = Sum([Counter])
       - Set Running sum "Over Group"

The problem is when I open the report I get a "Enter Perimeter Box" that asks me to define "Counter"  If I put in the number "1", everthing works fine.  How do I get rid of the "Enter Perimeter Box" when I open the report?

(Note: if I remove the "Total"  text box, I do not get the "Enter Perimeter Box" so it has to do something with the setup of the "Total" text box.)
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

Try referring to it like this:

Sum(Me.Counter)

Avatar of csall
csall

ASKER

I still get a "Enter Perimeter Box" that asks me to define "Counter."  As before, if I put in the number "1", everthing works fine.  
Try changing the ControlSource of your overall counter to "1" (same as the other), and setting the Running Sum to Over All.
ASKER CERTIFIED SOLUTION
Avatar of Jeffrey Coachman
Jeffrey Coachman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of csall

ASKER

LSMConsulting: Tried your answer first and it did not work.

boag2000: You solution gave me exaclty what I needed.  Thank you!  The example was also great.