Solved

Find Duplicate Records in Crystal Reports

Posted on 2010-09-15
9
809 Views
Last Modified: 2012-05-10
Hello Experts,
Is there any way to find duplicate records among two separate Crystal reports that have the same data fields in each report, but the record selection criteria is different?  So I guess what I may need to do is merge the reports together some how and then weed out duplicate records.  Any suggestions please?
0
Comment
Question by:jsmith08
  • 3
  • 3
  • 2
  • +1
9 Comments
 
LVL 19

Expert Comment

by:GJParker
ID: 33686101
You will need to get all of the dat atogether in a single report an dthen group on a common id field then you could inserta summary to count the number if records in each group.

it's hard to be more precise without having more details of your data.

HTH
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 33688905
Agree.

Are you using the same fields in the report?

If this is a one time problem, you could export the data to Excel after adding a field in each report that indicates which report it is from.
Merge the 2 Excel sheets and sort on a common field

mlmcc
0
 
LVL 34

Expert Comment

by:James0628
ID: 33689291
If you're actually reading the same data in both reports and just using different criteria, then you can just combine the criteria in one report.

 James
0
 
LVL 19

Expert Comment

by:GJParker
ID: 33689348
The IsNull test will definitely work wiith a LOJ as long as it is the only test on  table2
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:jsmith08
ID: 33691063
@mlmcc, yes I am using the same fields in each Crystal Report...so just to clarify...I should add a new field to both reports that just indicates which report the data is coming from ...or modify existing field names to indicate which report the data is coming from?

@James0628, I am using the same data I just have to apply different record selection criteria to the data.

My concern is that the different criteria that I have to run against the same set of data will create overlap and I don't want to produce a large report with several duplicate records.  Initially, I want to run different the Crystal using different record selection criteria, and then export the data to a text format.
I wanted to know if there would be a way for me to merge the Crystal reports and get unique records before I export the report.  I guess my best bet will be to rely on Excel to eliminate duplicates?
0
 
LVL 19

Expert Comment

by:GJParker
ID: 33691210
If it's a one off then excel would be your easiest option.
0
 
LVL 34

Expert Comment

by:James0628
ID: 33698713
I may very well be missing something, but if the 2 reports are reading the same tables, I still don't really see the problem.

 You've got criteria in one report: {fieldA} = {?param1} and {fieldB} = {?param2}

 You've got criteria in the other report: {fieldC} = {?param1} and {fieldD} = {?param2}

 If you, for example, add the second set of criteria to the first report, you only get the records that meet both criteria.  You may have to add new parameters for the criteria from the other report.

({fieldA} = {?param1} and {fieldB} = {?param2})
 and
({fieldC} = {?param3} and {fieldD} = {?param4})


 If you want to limit the results further (the "different record selection criteria" that you mentioned), just add the additional criteria where appropriate.  If the 2 reports produce different output (they show different fields or they're arranged differently or whatever) and you want to show the output from both reports, you can add the fields from the other report in a separate section.

 It _seems_ straightforward enough.  :-)

 James
0
 

Author Comment

by:jsmith08
ID: 33700242
@James...I could be over thinking this thing.  I will be working more with this today and I'll follow up with this question later.  Thank you.
0
 

Author Closing Comment

by:jsmith08
ID: 33801902
Sorry for the delay.  I ultimately exported the data from the Crystal report into Excel and then merged and sorted all of my data.  Thank you very much for all of the assistance!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now