Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: crystal report duplicate data Post Reply Post New Topic
<< Prev Page  of 2
Author Message
ChristianMuk
Newbie
Newbie
Avatar

Joined: 27 Sep 2012
Location: South Africa
Online Status: Offline
Posts: 15
Quote ChristianMuk Replybullet Posted: 10 Dec 2012 at 7:14pm
Yes The salesPerson and Likelihood can be different which means there are Multiple of salesPerson and Likelihood and i tried adding the word Distinct after Select in the query there is no difference.am really out of idea for this issue and many thanks for your concern and help into this.
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 11 Dec 2012 at 3:36am
So, the question becomes, how do you determine which sales person and likelihood to display?  Or is it just the first combination, whatever that is, that you need?
 
-Dell
IP IP Logged
ChristianMuk
Newbie
Newbie
Avatar

Joined: 27 Sep 2012
Location: South Africa
Online Status: Offline
Posts: 15
Quote ChristianMuk Replybullet Posted: 11 Dec 2012 at 6:53pm
My salesPerson and Likelihood are first select when the user is entering the Info into the DB then save to the DB and there is only one salesPerson and one likelihood per ETNUMBER
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 12 Dec 2012 at 3:21am
I'm hearing conflicting information from you:
 
Yes The salesPerson and Likelihood can be different which means there are Multiple of salesPerson and Likelihood
 
and
 
My salesPerson and Likelihood are first select when the user is entering the Info into the DB then save to the DB and there is only one salesPerson and one likelihood per ETNUMBER
 
The first one means that there are multiple combinations and the second means there is only one.  How you'll handle this is based on which statement is true.
 
-Dell
 
IP IP Logged
ChristianMuk
Newbie
Newbie
Avatar

Joined: 27 Sep 2012
Location: South Africa
Online Status: Offline
Posts: 15
Quote ChristianMuk Replybullet Posted: 12 Dec 2012 at 6:45pm
yes you are right i was confusing you, sorry for that.
OK, here's the scenario there is a table called Sales and the salesPerson comes from there and there are Multiple SalesPerson in that table and there is another table Called Likelihood and the Likelihood comes from there again there are multiple of Likelihood in that table
NOW, on the Tender table is where we found the ETNumber and one ETNumber can only have One SalesPerson and One Likelihood.
and on the report all i want is to the ETNumber with its SalesPerson and its Likelihood respectively.
SORRY again for the confusion 
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 13 Dec 2012 at 3:16am
Since the link from Tender to Sales and to Likelihood is one-to-one, that's not where your duplicate data is coming from.  Can Tender have multiple rows per ETNumber?  Or do you have other tables in the report that have a one-to-many relationship with ETNumber that would be causing duplicate data?
 
-Dell
IP IP Logged
ChristianMuk
Newbie
Newbie
Avatar

Joined: 27 Sep 2012
Location: South Africa
Online Status: Offline
Posts: 15
Quote ChristianMuk Replybullet Posted: 13 Dec 2012 at 8:00pm

No a T ender can only have one row per ETNumber.but now i am starting to think since i have a customers Table which is link to the Tender Table with a one-to-one relationship and the Contact Table is link to the Customers with a one-to-many relationship might be the problem

 
Relationships Cardinalities:
Contact Table(ContactID(PK),CustomerID(FK)) -->One-to-many-->Customers Table(CustomerID(PK))
Customers Table(CustomerID(PK)) -->One-to-One-->Tender Table(ETNumber(PK),CustomerID(FK))
Tender Table(ETNumber(PK),SalesID(FK))-->One-to-One-->Sales Table(SalesID(PK))
Tender Table(ETNumber(PK),LikelihoodID(FK))-->One-to-One-->Likelihood Table(LikelihoodID(FK)) 
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 17 Dec 2012 at 4:56am
The one-to-many IS your problem.  You need to determine how to limit the contacts to one record.
 
-Dell
IP IP Logged
ChristianMuk
Newbie
Newbie
Avatar

Joined: 27 Sep 2012
Location: South Africa
Online Status: Offline
Posts: 15
Quote ChristianMuk Replybullet Posted: 14 Jan 2013 at 11:52pm
HI Hilfy
sorry i wasnt around for quiet a long time i went to see my family.
i understand what you are saying but can you help me on how to limit a contacts to only one record?
IP IP Logged
<< Prev Page  of 2
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.047 seconds.