Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: If tables are already linked then the join typ etc Post Reply Post New Topic
Author Message
martingaleh
Newbie
Newbie


Joined: 19 Mar 2012
Online Status: Offline
Posts: 1
Quote martingaleh Replybullet Topic: If tables are already linked then the join typ etc
    Posted: 19 Mar 2012 at 12:58pm
I have three tables.  One has.

TableA
month
customer
data

TableB
month
customer
data

I want to join Table A with Table B, but the customer fields in Table A and B don't match, So I need a junction table

TableC
Customer_from_Table_A
Customer_from_Table_B

In SQL I would just write
select *
from table A
left join tableC on TableA.customer = TableC.Customer_from_Table_A
left jion tableB on TableA.month = TableB.month and TableC.Customer_from_Table_B = TableB.customer

But I have to use the links thing instead.  When I do the arrows etc, I get the error:
Database connection error: If tables are already linked then join  type can not change.

I suspect, it's because Crystal is trying to join Table B to Table A before first joinging TableC to Table A when building the query.  How would I fix this?

Oh, yes.  Crystal reports XI



Edited by martingaleh - 19 Mar 2012 at 12:58pm
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 21 Mar 2012 at 5:24am
right click on the link, and you can change the link type to an outer join.
 
I'll be honest, I know that this can be done, but have never done it myself, you I am not sure how CR determines left and right...I suspect it is my the layout and to which side the link arrow points to...
 
if you can line up the tables so that links go from the right side of the first table to the left side of the next table, that left and right are 'obvious'
 
I know I would have to play a bit to make sure that it works as expected.
 
HTH
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.031 seconds.