Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Find All Duplicates Post Reply Post New Topic
Author Message
gcutter
Newbie
Newbie


Joined: 19 Nov 2007
Online Status: Offline
Posts: 4
Quote gcutter Replybullet Topic: Find All Duplicates
    Posted: 19 Nov 2007 at 12:19pm
I am needing to find all duplicates from a set of data and leave out records that are not duplicates.
 
Prim Key
Material       MatLoc
12345          A-1
12345          B-1
56789          C-1
56789          D-1
 
Thanks in Advance
 
CR XI sp2
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 19 Nov 2007 at 1:01pm
If you are familiar with SQL commands, I would a SQL statement like the following:
SELECT PrimKey, Count(*) FROM table WHERE Count(*) > 1 GROUP ON PrimKey

If you aren't familiar with SQL, then I would use a summary field and use the Group Selection formula to filter out data where the summary field =1.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
gcutter
Newbie
Newbie


Joined: 19 Nov 2007
Online Status: Offline
Posts: 4
Quote gcutter Replybullet Posted: 20 Nov 2007 at 5:13am
Thanks that worked. I used the second part using Group Selection Formulas. I was not sure where to insert the SQL code in Crystal Reports. I am trying to make the switch from Access Report to CR. I am finding CR to be very nice to work with compared to Access.
 
Thanks,
Greg
IP IP Logged
Lugh
Senior Member
Senior Member
Avatar

Joined: 14 Nov 2007
Online Status: Offline
Posts: 377
Quote Lugh Replybullet Posted: 20 Nov 2007 at 6:49am
Assuming you are still using Access as your data source, you would just create a query with the SQL in it.  You can base your Crystal Report on the query itself, without needing to refer to the base tables themselves.


IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.015 seconds.