Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Duplicate Entries Post Reply Post New Topic
Author Message
rftd
Newbie
Newbie


Joined: 09 Jun 2008
Online Status: Offline
Posts: 24
Quote rftd Replybullet Topic: Duplicate Entries
     Posted: 16 Jul 2009 at 12:56pm

Is there anyway for crystal reports to identify exactly duplicate (i.e. every field is exactly the same) entries in the database?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 16 Jul 2009 at 2:11pm
Not really. Theoretically you could compare it using a very long variable but it would be a mess and it would not eliminate the duplicates.
If you used a COMMAND with GROUP clause on all fields being brought in as your datasource it would eliminate all the dupes (or a stored proc or view that does the same thing).
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 16 Jul 2009 at 2:13pm

You could also make all of the fields suppressed if duplicated and then suppress the row if empty, although this works only if the sorting supports it and will not elminate rows so they are still included in any calculations.



Edited by DBlank - 16 Jul 2009 at 2:14pm
IP IP Logged
rftd
Newbie
Newbie


Joined: 09 Jun 2008
Online Status: Offline
Posts: 24
Quote rftd Replybullet Posted: 16 Jul 2009 at 2:17pm

what if I wanted to eliminate all entries that DIDN'T have duplicates?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 16 Jul 2009 at 2:26pm
In SQL I would add a COUNT to the GROUP process and finally a select stament on the COUNT as > 1.
You should also be able to do that using a COMMAND


Edited by DBlank - 16 Jul 2009 at 7:01pm
IP IP Logged
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