Totalling the number of distinct customer names

R

Rick Deemer

I have run a query that I am making a report from. In that report I need to
group the data by LOCATION, ZIPCODE, and PATIENT NAME so I have setup the
grouping accordingly. I also have setup for totals of the amounts
associated with each record. My problem is that I get the expected totals
broken down by LOCATION, ZIPCODE and PATIENT NAME but what I want to do is
along with this information get a count of the number of patients. Now the
problem is that each of the counts that I have devised only count the number
of record not the distinct number of patients. For instance, I could have
John Smith that received 20 items from us and in the type of count that I am
asking for I shouls only get "1" but what I get is "20" because his name is
listed on all 20 records.
 
M

Marshall Barton

Rick said:
I have run a query that I am making a report from. In that report I need to
group the data by LOCATION, ZIPCODE, and PATIENT NAME so I have setup the
grouping accordingly. I also have setup for totals of the amounts
associated with each record. My problem is that I get the expected totals
broken down by LOCATION, ZIPCODE and PATIENT NAME but what I want to do is
along with this information get a count of the number of patients. Now the
problem is that each of the counts that I have devised only count the number
of record not the distinct number of patients. For instance, I could have
John Smith that received 20 items from us and in the type of count that I am
asking for I shouls only get "1" but what I get is "20" because his name is
listed on all 20 records.


Where do you want the Count?

To get the count in the ZipCode group footer section, add a
text box named txtPatientCounter to the Patient group
Header/footer section. Set its ControlSource to =1 and
RunningSum to Over Group. The zip code group footer can
then display the number of patients in the area by using a
text box with the expression =txtPatientCounter

Similarly, you could get a total of all patients in the
report footer by setting the RunningSum propert to Over All.
 

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