Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Loss of data on linking Post Reply Post New Topic
Author Message
boldon mackem
Newbie
Newbie


Joined: 26 May 2009
Online Status: Offline
Posts: 9
Quote boldon mackem Replybullet Topic: Loss of data on linking
    Posted: 01 Jun 2009 at 8:11pm
I have a large database (DB1) which  holds all but one string of info' I need for a report (freight cost), another db (DB2) holds this and links easily via 2 simple links.  However the 2nd database only has half the number of transactions in as not all of the transactions in DB1 have a freight cost.
 
When I drop in the freight cost field from DB2, I lose all the transactions from DB1that don't have freight costs against them.
 
Is there any way  I can add this freight cost field, but have it leave a blank where their is no corresponding data to link to in DB2?


Edited by boldon mackem - 01 Jun 2009 at 8:11pm
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 02 Jun 2009 at 6:58am

click on the links between the databases, I think that they are tables, but in the link you will need to play with the joins.  I always get confused in the screen, but you want an outer join.  An inner join will only show the transactions between the tables that match.  An outer join gives everything in one table and the matches to the other tables.

Why I get confused, is that it probably how you drew the link, but in SQL a left join is take everything from the table on the first table (the one on the left side of the page) and the matching records in the table on the right.  Anything that doesn't match has a value of NULL.
 
Try it one way and if it doesn't improve the report, try it the other way, it should work then.
 
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.016 seconds.