Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Connecting two tables and printing an exception Post Reply Post New Topic
Author Message
danahawk
Newbie
Newbie


Joined: 28 Apr 2015
Online Status: Offline
Posts: 11
Quote danahawk Replybullet Topic: Connecting two tables and printing an exception
    Posted: 19 Jun 2015 at 9:32am
I have to tables I am linking.
I only want to print a line of data if my first table does not find a 'link' record on the second table.

Is this possible????
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 22 Jun 2015 at 5:45am
1. Link FROM the first table TO the second.
2. Right-click on the link and select "Link Options".
3. Make it a "Left Outer" join.
4. In the Select Expert, edit the formula manually and add something like this:

IsNull({Table2.LinkToField})

This will give you all of the records from Table1 that have no corresponding record in Table2.

-Dell
IP IP Logged
danahawk
Newbie
Newbie


Joined: 28 Apr 2015
Online Status: Offline
Posts: 11
Quote danahawk Replybullet Posted: 23 Jun 2015 at 9:41am
Hi Dell,

I did what you said and it is not working.

Any suggestions?
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 23 Jun 2015 at 10:25am
Did you select Default Values for Nulls in the Select Expert?

Edited by kevlray - 23 Jun 2015 at 10:26am
IP IP Logged
danahawk
Newbie
Newbie


Joined: 28 Apr 2015
Online Status: Offline
Posts: 11
Quote danahawk Replybullet Posted: 23 Jun 2015 at 10:28am
not to be a total stupid, but what do you mean by default values for nulls
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 24 Jun 2015 at 3:29am
If you look at the top of the Formula Expert after clicking on the Formula button in the Select Expert, there's a drop-down that reads either "Exceptions For Nulls" or "Default Values for Nulls". You want it on "Exceptions for Nulls" for this to work.

-Dell
IP IP Logged
danahawk
Newbie
Newbie


Joined: 28 Apr 2015
Online Status: Offline
Posts: 11
Quote danahawk Replybullet Posted: 24 Jun 2015 at 3:46am
Mine is on "Exceptions for Nulls" ???
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 24 Jun 2015 at 4:47am
In what way is it not working?

-Dell
IP IP Logged
danahawk
Newbie
Newbie


Joined: 28 Apr 2015
Online Status: Offline
Posts: 11
Quote danahawk Replybullet Posted: 24 Jun 2015 at 4:58am
It is printing all of the records.

I only want to print data from my 1st table if it can't find a link/record on the 2nd table.
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.032 seconds.