Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

counting duplicates as one 1

Status
Not open for further replies.

leedy33

Technical User
Jun 15, 2005
51
0
0
US
Im using crystal 8.5 and in my report im trying to count up or get a sum number, of my total amount of samples that fall within a certain date. The sample group is what im trying to count, but there are duplicate groups sometimes for the same date, and what is happening is that in my count it is counting more than once because of the dups, when all i want is a 1 count for each group as a whole, not the mulitple groups. I then want to be able to sum up those groups that fallen in a certain date range. An example:
Sample Group Date
1199 1/1/06
1199 1/1/06
1120 1/3/06
1120 1/3/06
1120 1/3/06
1121 1/3/06

--> I want to be able to count the groups within a date range, and i want to have a count/sum of "3" for the groups, but instead im getting a count/sum of "6" is there a way to make a distinct, so it only counts each group once. Thanks.
 
Use DistinctCount.

If you need to sum something, use a Running Total and set the accumulation frequency to Once for Each group (if the sub-group is by date, you need to add that group level).

hth,
- Ido

Visual CUT & DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
If you want a count for each unique sample group/date combination try the following:
Group 1 - Sample Group
Group 2 - Date

Inset a running total on the date field. Type of Summary should be "count" and the Evaluate Section should mark "on change of group". The group should be Date (group 2). Then reset "never" for report total count.

MrBill
 
Mr. Bill~
How do i go about making it so the total is the only thing that shows, instead of the whole running list. Other than that it works just fine. Thanks
 
In the grey area on the left of the reports section, right click in any section and select "suppress no drill down".
MrBill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top