Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: parameters cause duplicate records Post Reply Post New Topic
Author Message
jcwco
Newbie
Newbie


Joined: 06 Feb 2009
Online Status: Offline
Posts: 3
Quote jcwco Replybullet Topic: parameters cause duplicate records
    Posted: 06 Feb 2009 at 12:11pm
I'm working on a Crystal report for our GoldMine database. I have it set up to display contact information for each record, and then in the details it displays the history records for each contact. it is all working fine, until I set up parameters with the selection expert.
 
If I use the "state" info from the contact record, it works fine. But if I use "ZIP code" info I get duplicate entries in of the history records.

The Contact records don't duplicate but some of the contacts have several duplicate history records when the report is run.
 
This also happens if I use the age of the history records as a criteria for the select expert.
 
I have checked the records against our GoldMine database, and there are not actually duplicates there.
 
Any help appreciated.
 
matt
 
GoldMine 8.03, Crystal XI, and SQL Server 2005
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 06 Feb 2009 at 12:29pm
Go to the Database menu.  Is "Select Distinct Records" greyed out?  If not, turn it on.
 
If it's greyed out, go to the File menu and select Report Options.  Is "Use Indexes or Server for Speed" greyed out?  If not, turn it on and then go back to turn on Select Distinct Records.
 
-Dell
IP IP Logged
jcwco
Newbie
Newbie


Joined: 06 Feb 2009
Online Status: Offline
Posts: 3
Quote jcwco Replybullet Posted: 06 Feb 2009 at 12:53pm
Those options are not greyed out, but when I select them I get this message:
 
Database Connector Error: '42000:[Microsoft][ODBC SQL Server Driver][SQL Server] The text data type cannot be selected as DISTINCT because it is not comparable. [Database Vendor Code: 421 ]'
 
after I click out of the warning, it comes up blank.
 
edit: Sorry, I forgot to say thanks for the suggestion!


Edited by jcwco - 06 Feb 2009 at 1:07pm
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 06 Feb 2009 at 1:15pm

In SQL Server, "Text" fields are long strings, which work like BLOBS and can't be used in Distinct queries.

Ok, try this....
Is there any field in the History data that you can group on?  If so, group on that and put the data in the History group header section(s) instead of in the Detail sections.
 
-Dell
IP IP Logged
jcwco
Newbie
Newbie


Joined: 06 Feb 2009
Online Status: Offline
Posts: 3
Quote jcwco Replybullet Posted: 06 Feb 2009 at 1:33pm
I'll try that. I'll let you know how it goes on Monday.
 
Thanks again.
 
Edit: Didn't take as long as I thought to try it out...worked like a charm. Now my results are correct no matter what I put in the select expert.
Clap


Edited by jcwco - 06 Feb 2009 at 2:13pm
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.016 seconds.