Print Page | Close Window

Mailing Labels and Removing Duplicates

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=5415
Printed Date: 03 May 2024 at 10:26am


Topic: Mailing Labels and Removing Duplicates
Posted By: Butterfly_Joe
Subject: Mailing Labels and Removing Duplicates
Date Posted: 04 Feb 2009 at 3:27pm
Hello, I am new to Crystal Reports and after finding this site, it looks like there is a plethora of advice that can help me get started playing around with Crystal reports. But let's get down to business.

I am creating a report to pull mailing information from an ODBC database and since I am very new to Crystal Reports (ver 10), I used the Wizard to accomplish my task. Everything worked perfectly, however, this mailing list can, at times, have duplicate information (addressee, address line 1, address line 2, city/state/zip). The layout of the mailing labels (avery 5160) is as such:

Addressee               <--Only database field
Address Line 1       <--Only database field
Address Line 2       <--Only database field
City, State ZIP        <--Text box with the three database paths inside

Now, I read about the Crystal Syntax to suppress duplicate fields by comparing information to previously populated information, which works when applied to the Addressee, Address Line 1, and Address Line 2, however, I cannot apply that formula to the City, State ZIP text field because it would suppress MOST of the fields, since the addressees live in similar locations.

So, my question is, would there be any way to tell the report that when ALL four lines are replicated in the report, to only display one of them?

Thanks for any help!



Replies:
Posted By: hilfy
Date Posted: 04 Feb 2009 at 9:12pm
Instead of getting that complicated, got to the Database menu and see if "Select Distinct Records" is available.  If it is, select it.  If the case and format of the duplicates is exactly the same, this will take care of the issue for you.
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: Butterfly_Joe
Date Posted: 05 Feb 2009 at 5:43am

Thanks for the fast response hilfy!

That would be my initial thought process, since I have an extensice MS Access background.  Unfortunately, this report is going to be utilized in an ERP system called Sage Timberline.  So, to my knowledge (though I will do more research), there would be no way for me to achieve that. 
But I will try and see if that would be possible by calling Timberline's Tech Support (joy!).
 
Any other work arounds would be appreciated, just in case I cannot solve the issue that simply.


Posted By: hilfy
Date Posted: 05 Feb 2009 at 8:54am

Go to Report Options on the Edit menu.  See if "Use Indexes Or Server for Speed" can be edited.  If it can, make sure that it is checked.  If it wasn't, check it, save the change, and then see if "Select Distinct Records" is available.

The other reasons why I've seen this not be available are:

1.  The data is in a file-based database instead of a client-server database.

2.  A blob field is being used on the report (you can't use distinct with blobs.)

Another possible work-around is to use a group:

1.  Create a formula for each of the fields in your address to provide a default if the field is null.  They look something like this:

if isnull({table.addressee}) then " " else {table.addressee}
 
2.  Create a formula for your group that looks this (I assumed that each of the formulas from step 1 are named for the field they reference):
 
mailto:%7b@adressee - {@adressee } + mailto:%7b@address1 - {@address1 } + mailto:%7b@address2 - {@address2 } + mailto:%7b@city - {@city } + mailto:%7b@state - {@state } + mailto:%7b@zip - {@zip }
 
3.  Create a group on this formula.
 
4.  Put all of your fields in the group header section(s) and suppress the detail section(s).
 
-Dell

 


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: Butterfly_Joe
Date Posted: 05 Feb 2009 at 1:50pm

hilfy, thank you so much!  The first suggestion of yours worked!  I really appreciate all your input and tips!

Take care!




Print Page | Close Window