Joined: 23 Mar 2007
Location: United States
Online Status: Offline
Posts: 4
Topic: Formula for suppressing data? Posted: 27 Apr 2007 at 12:13pm
I'm trying to filter a Crystal Report that has duplicate entries in a number of fields. The report is for mailing brochures to our company's customers. If we have separate customers at the same address they will each get a brochure but we want to limit this to one per address. The data looks something like this:
John Smith 123 Main Street Jericho, KS 12345 Mary Smith 123 Main Street Jericho, KS 12345 Mike Jones 136 Ascii Drive Miami, FL 77777 Beth Jones 136 Ascii Drive Miami, FL 77777 etc.
Since each record is different, the 'Select Distinct Records' in the Database menu has no effect. Also using 'Suppress if Duplicated' in the fields doesn't really help because the records are still out there. I need all of the data in each record for the mailings except in the case of multiple names.
Does anyone know a VB formula or SQL expression that I can insert into this report that will take out records with some fields identical and others different? For example IF Street + City + Zip is identical THEN display one record or something like that? I posted a similar question yesterday in the Report Design forum. Any help that anybody can offer is greatly appreciated. Thank you.
Joined: 27 Apr 2007
Location: United States
Online Status: Offline
Posts: 2
Posted: 27 Apr 2007 at 2:08pm
How about creating one field inside the SQL command that has all the
fields that would make a duplicate, and then create a group inside
crystal and only print the group?
You can also use the 'group by' option in your sql statement.
This would give you complete control on what you deem as duplicates.
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