How do you count the number of TechIDs listed in the report? If Bob, Joe, and Mary are listed in the report, then the total TechIDs should be 3. But, I think because each TechID is related to a ServiceType, when you count via the grouped TechIDs, the total reflects the total ServiceTypes for that TechID because it counts every related instance. But I only want to see the number of techs listed in my report. Is this possible? Thanks.
Juan C Rivera
@Reply 5 years ago
you have to get a field that seperates them, ie JobDescription. in your query the criteria will be jobDescription = Tech result will be tech. Then use the count([JobDescription])
Hope that helps.
V/r
Juan
Elaine HeltmanOP
@Reply 5 years ago
Sorry for not responding sooner, Juan. What I neglected to describe for my report, was that the report fields are from different related tables. I only want to count the TechIDs, regardless of the number of related service types. If I understand your suggestion, you want me to add a unique field to distinguish the TechIDs, but the IDs are already unique. Thank you for your help.
Juan C Rivera
@Reply 5 years ago
Hello, take a look at Richards tech help video on helper files. I use that video to set up my database where I have several individuals and based on qualifications fall into several positions. like I have one that can perform service call, and filed work one name two diffrent jobs. when I run a repoort to see who and how many do I have that can do a job the name will show. In this report I will see the name 2 times in diffrnt section. where as another may only do field work, then the name will only show one time. in the report I use the =count([]) to add up the individuals. I kinda tap dance around this question in hopes to hit a wider target in order to help you. If you need more help we can work this out. Willing to help always.
V/r
Juan
Elaine HeltmanOP
@Reply 5 years ago
Thanks, Juan. I'll give it a try!
Elaine HeltmanOP
@Reply 5 years ago
Thanks again, Juan. Helper Tables are great, but not for what I need. As I ask questions, I am slowly improving how I compose my question so I get the desired answer! I'll try again - the report is based on a query that combines information from 2 tables, say customers and orders, and the report is grouped by customers. Each customer has multiple orders. I want to show the total number of customers, counting each customer only once regardless of the number of their orders. Using =count([customerID]) returns the same number as =count(OrderID]), which is the grand total orders. I want the total customers. Thanks!
Scott Axton
@Reply 5 years ago
Elaine
It kind of sounds like you may need to change your grouping and sorting levels for your reports.
Check out this article that Richard posted some time ago and see if this doesn't help.
I see that you have started Developer levels so hopefully you also have gone through the Expert series.
Check out Expert 12 for detailed information on totaling in reports.
Hope that helps
Adam Schwanz
@Reply 5 years ago
If you don't have many techs you could just make your own counter. If you do have a lot though, I think there's a SQL function called DISTINCT for queries that could perform this task. Not sure if Richard has covered it anywhere yet.
Kevin Robertson
@Reply 5 years ago
I tried for ages to get the results you are looking for. The only way I could get it to work was with a SubReport.
I would imagine there are better solutions but this way is easy to implement.
Elaine HeltmanOP
@Reply 5 years ago
Adam, SELECT DISTINCT did the trick. Found it here with another member's fix: https://599cd.com/blog/display-article.asp?ID=352&CommentID=5728#StartOfComments. Thanks everyone!
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.