Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: isnull comparison Post Reply Post New Topic
Author Message
cognos79
Newbie
Newbie


Joined: 28 Aug 2008
Online Status: Offline
Posts: 4
Quote cognos79 Replybullet Topic: isnull comparison
     Posted: 29 Aug 2008 at 5:31am
I am using crystal 10 and it seems null comparison is not working as intended. is there something I am missing.
 
if isnull({test.state}) then 'hello' else 'hi'
 
the output is like this:
 
pa   hi
nj    hi
null 
null 
 
hello is not printed for null state values.
 
Thanks...
 
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 29 Aug 2008 at 7:38am
Hi
 
try below
 
if isnull({test.state}) or {test.state}= '   ' then 'hello' else 'hi' and see if you get hello for state where it is null may be some records have spaces in them which are not nulls....
 
cheers
rahul
IP IP Logged
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