Formula for suppressing data?
Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2022
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=596
Printed Date: 04 May 2025 at 5:41am
Topic: Formula for suppressing data?
Posted By: lions_share
Subject: Formula for suppressing data?
Date 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.
|
Replies:
Posted By: rafaelm112
Date 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.
|
|