Data Connectivity
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Data Connectivity
Message Icon Topic: Linking Tables Post Reply Post New Topic
<< Prev Page  of 3 Next >>
Author Message
stevetothink
Newbie
Newbie


Joined: 18 Oct 2010
Online Status: Offline
Posts: 37
Quote stevetothink Replybullet Posted: 09 Jun 2011 at 9:39am
Ha - I don't even know what that means.

Allow me to correct my prior post.

Changing the setting to include unique records didn't cause this problem. The problem is caused when I linked a new table and inserted a field that only applies to terminated employees.

The result is that the report now only runs for terminated employees. I want the report to run for all employees but only show the inserted field when displaying a terminated employee.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 09 Jun 2011 at 9:42am

assuming you have no select statement then it is likely to do with a join. sounds oike you store termination data in a separate table from the employee table

is that correct?
IP IP Logged
stevetothink
Newbie
Newbie


Joined: 18 Oct 2010
Online Status: Offline
Posts: 37
Quote stevetothink Replybullet Posted: 09 Jun 2011 at 9:47am
The original report automatically picked up active & terminated employees and included the following 2 tables:
1. ROTPersonnelStatusTableB
2. ROTPersonnelStatusTable

I added a link to a table called "Closing_Statement"

Then I wrote a custom formula as follows:

If isnull ({Closing_Statement.Vest Cancel Date}) then {ROTPersonnelStatusTableB.Expiration Date}
else {Closing_Statement.Vest Cancel Date}


If instead of using this formula I simply insert {ROTPersonnelStatusTableB.Expiration Date}, the report includes both active and terminated people. However, when I insert the custom formula above, it only pulls terminated people.

I'd like to use my custom formula above and have it show both active & terminated people.

Thanks again for the help.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 09 Jun 2011 at 9:51am
it has to do with the join to the closing statement table
I assume only staff that are termed have a matching row in that table
if you made your table join an inner join it only returns rows where there is a match in BOTH tables
you need to alter it to an outer join.
IP IP Logged
stevetothink
Newbie
Newbie


Joined: 18 Oct 2010
Online Status: Offline
Posts: 37
Quote stevetothink Replybullet Posted: 09 Jun 2011 at 10:03am
thanks - how do I change it to an outer join?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 09 Jun 2011 at 10:10am
Database Menu
Database Expert
Links Tab
Double click on the join (line between the 2 tables)
Link options window opens
Change it to LEft outer Join in the Join TYpe
 
IP IP Logged
stevetothink
Newbie
Newbie


Joined: 18 Oct 2010
Online Status: Offline
Posts: 37
Quote stevetothink Replybullet Posted: 09 Jun 2011 at 10:12am
Thanks - left outer join didn't fix the problem.

Full outer join seems to have worked.

What do these settings mean?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 09 Jun 2011 at 10:14am
try right outer join
IP IP Logged
stevetothink
Newbie
Newbie


Joined: 18 Oct 2010
Online Status: Offline
Posts: 37
Quote stevetothink Replybullet Posted: 09 Jun 2011 at 10:26am
Right outer join and full outer join work for some people but not others.

For example, all terminated people have a vest cancel date. The report now displays both active & terminated people but it does not show the vest cancel date for all terminated people.

Steve
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 09 Jun 2011 at 10:30am
It is difficult to assist as I am completely guessing at your table structure and joins...
an outer join (left or right) includes all row from one table (left or right) and matching rows from the other.
a FULL OUTER JOIN includes all rows from both tables.
since you only altered one join the other joined table still is impacting your returned rows.
What are the 3 tables
How are they join and what data (purpose) is each table
IP IP Logged
<< Prev Page  of 3 Next >>
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.033 seconds.