Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Linking problem Post Reply Post New Topic
Author Message
hello
Groupie
Groupie
Avatar

Joined: 05 Feb 2014
Online Status: Offline
Posts: 85
Quote hello Replybullet Topic: Linking problem
    Posted: 14 May 2014 at 11:51am
I have a {customer.table} and a {transaction.table} that are linked using the inner join method.

Each sale is recorded in the transaction table along with the salesperson code.

I would like to print a report for each customer that has been working with salesperson 'MS'.

When I use Record Select Expert to only include the 'MS' salesperson, I get multiple customer records because the 'MS' salespersons may have sold to that customer many times in the past.

Am I linking the two tables wrong?

Thanks for any help.

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 15 May 2014 at 4:29am
you are linking "correctly" however you can use a SQL command or a stored proc to make your selection different like using a SELECT DISTINCT.
If you want only one record to appear in crystal you can als group on the customer and suppress the detail section. If you havemore than one salesperson you would need to group on that too, or combine the customer and salesperson into a formula field and group on that.
IP IP Logged
hello
Groupie
Groupie
Avatar

Joined: 05 Feb 2014
Online Status: Offline
Posts: 85
Quote hello Replybullet Posted: 15 May 2014 at 5:54am
I see...

Group by customer and suppress the detail worked great!

Summarizing any customer fields includes ALL the detail added up though...including the duplicates.

So,I guess if I want a summary not including duplicates, I would create a running total field and sum on change of group-CUSTOMER?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 15 May 2014 at 6:20am
likely.
depends on each summary. sometimes using a distinct count is simpler.
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.