Counting registers twice!!

  • Thread starter Thread starter pr1357
  • Start date Start date
P

pr1357

Hello, I'm having problems creating the total for a report I have here.
I created a report and for some fields I set the "hide othe
occurences" option, from the properties window. One of these fields i
a "Client Code" field (which is the one I'm going to be counting). A
the end of my report I must have a total (that is actually how man
clients are listed, not counting repeated ocurences of the sam
client). I did this by creating a "text box" and atributing to it
value with "=Count([ClientCode])".
The problem is that some clents appear more then once in this report
an although the "hide other ocurences" atribute makes the othe
ocurences invisible, they are being counted with this method I used. S
I'm getting a diferent number of clients than I should be getting (mor
actually since the repeated ocurences are being counted too).
How can I create this total field I need? Any ideas are welcome, an
thank you in advance
 
The solution is to modify your report's underlying query rather than the
report. Open the query in design view and select its properties. Set the
Unique Values property to be true (or in the SQL view change the first
Select statement to Select Distinct.) This will "hide the duplicates" in
the underlying query.
 

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

Similar Threads


Back
Top