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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Count function to find duplicate entries, problem

Status
Not open for further replies.

cinbh

MIS
Apr 16, 2002
58
US
I have found that I can not base an sql select using count. My situation is I need to find occurences where a customer's order has been duplicated by data entry. Typically, I would first count a customers PO# first.
Cust # PO# Ord# ShipWeek
2002 CA201 500011 07/15/02
2002 CA201 409988 07/15/02
2002 CA200 409999 07/22/01
9998 BE3SE 589998 07/29/01
The only one I would need on my report would be PO# CA201 since this would most likely be a duplication. Because count only works after the select I'm not exactly sure what my options are. I'm relatively new to Crystal 8.5, previous experience is in Informix-Sql Ace report programming. Thank you, Cindy
 
Group on the P.O. Number

Create a Summary -> Count on the P.O. Number

Use Report->Edit Selection Formula->Group...

Double-click your summary in the field box. Type
Code:
> 1
after it in the formula area. At this point, you should be able to save the formula and have only the P.O. Numbers with duplicates show up.

The formula should look something like
Code:
Count({table.PO#}, {table.PO#})
, I think.
 
Thanks, for the quick response. I hadn't used the Group selector as yet so I'll give it a try. I'll let you know if I still experience problems.
Cindy
 
Canthros is correct.

CR will still return all of the records, but it will only print the ones that are in groups with a subtotal greater than 1. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top