Print Page | Close Window

Linking problem

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=20738
Printed Date: 05 May 2024 at 12:29am


Topic: Linking problem
Posted By: hello
Subject: Linking problem
Date 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.




Replies:
Posted By: DBlank
Date 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.


Posted By: hello
Date 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?


Posted By: DBlank
Date Posted: 15 May 2014 at 6:20am
likely.
depends on each summary. sometimes using a distinct count is simpler.



Print Page | Close Window