Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: 30/11/-2 instead of Null Post Reply Post New Topic
Author Message
chimp8471
Newbie
Newbie


Joined: 12 Jan 2012
Location: United Kingdom
Online Status: Offline
Posts: 4
Quote chimp8471 Replybullet Topic: 30/11/-2 instead of Null
    Posted: 31 Jan 2012 at 3:08am
I have the following formula
 
if {WOSUB.SUBCPD} > 0 then numbertodate ({WOSUB.SUBCPD}) else numbertodate ({WOSUB.SUBCPD})
 
 
which works except if {WOSUB.SUBCPD} is null, at which point it will place the following:
 
 
30/11/-2
 
I need the formula to force this to be null if the {WOSUB.SUBCPD} field is null
 
PLease advise how i can change my formula to make this work
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 31 Jan 2012 at 3:47am
i don't really understand your formula here as I am not familiar with the numertodate() and it is not in my help file and your "then" output is the the same as your "else" output.
That being said, you can create a formula field with nothing in it called NULL. You can then call that formula field in your other formula.
I would rework this as it does not make sense to me but strictly following your request it would be:
 
if isnull({WOSUB.SUBCPD}) then {@NULL} else if {WOSUB.SUBCPD} > 0 then numbertodate ({WOSUB.SUBCPD}) else numbertodate ({WOSUB.SUBCPD})
 


Edited by DBlank - 31 Jan 2012 at 3:48am
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.