Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Returning Fields linked to blank records Post Reply Post New Topic
Author Message
Crystal_amateur
Newbie
Newbie


Joined: 30 Jul 2012
Online Status: Offline
Posts: 2
Quote Crystal_amateur Replybullet Topic: Returning Fields linked to blank records
    Posted: 30 Jul 2012 at 3:25am
I am trying to write a report that returns the names which have blank records against them for Appraisal.  I can get all the records with appraisal records but when using If isnull({tbl.field}) then "--blank--" else {tbl.field}  I keep getting asked for a boolean at the end and don't know what it wants?
 
Has anybody got any ideas please?
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 30 Jul 2012 at 5:08am
If the formula is in the selection criteria, yes it needs to return a boolean. I am assuming {tbl.field} is a string.
IP IP Logged
Crystal_amateur
Newbie
Newbie


Joined: 30 Jul 2012
Online Status: Offline
Posts: 2
Quote Crystal_amateur Replybullet Posted: 30 Jul 2012 at 5:17am
Thank you for replying but I have reached the end of my knowledge and tether with this, I thought a boolean was a true or false statement but it won't accept this, the help desk have now said that it is something to do with the links in my table selection and gone away to work it out, probably won't hear from them again! 
Anyway this is what I have so far  .....  If isnull({Competency_Appraisal_History.Appraisal Number}) then "--blank--" else ..........
not sure what to do next? 
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 30 Jul 2012 at 7:21am
The formula you're showing would work well for a formula to show data on a report.  However, it will not work in the selection criteria as it returns a string, not a boolean.  To use this in the selection criteria, you would have to do two things:
 
1.  Join FROM the name table TO the appraisal table.  Right-click on the join, select Link Options and make this a "Left Outer" join.  This will give you all of the records from the name table regardless of whether they have data in the appraisal table.
 
2.  If you want to just show the names that do NOT have an appraisal, put the following in the selection formula:
 
IsNull({appraisal.field})
 
This will return true when there is no appraisal record.
 
-Dell
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.