Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: checking for null value using formula Post Reply Post New Topic
Author Message
CRMSFDC
Newbie
Newbie


Joined: 04 Dec 2008
Online Status: Offline
Posts: 13
Quote CRMSFDC Replybullet Topic: checking for null value using formula
     Posted: 25 Feb 2009 at 10:13pm
Hi,

I need to check the amt value is returning null or value.
but i'm getting error as "sring is required" .
help me out for this simple validation.

code:
if isnull({tbname.Amount})=true then '-'
else
{tbname.Amount}

Thanks in advance!
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: 26 Feb 2009 at 1:39am
Hi
 
just change the code to
 
if isnull({tbname.Amount}) then '-'
else
totext({tbname.Amount},0)
 
to text converts the amount field to string and 0 removes decimal places, if you want deciman place remove ,0
 
 
cheers
Rahul


Edited by rahulwalawalkar - 26 Feb 2009 at 1:41am
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