Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: [Resolved] Help with IF THEN statement Post Reply Post New Topic
Author Message
dimah77
Newbie
Newbie


Joined: 27 Jul 2009
Online Status: Offline
Posts: 3
Quote dimah77 Replybullet Topic: [Resolved] Help with IF THEN statement
    Posted: 27 Jul 2009 at 2:22pm
Hi, here is my newbees problem ;
I have datafield 'date_naiss' with date type , and boolean field 'presume' from same table ,
I wish to display birthday (date_naiss field) as it is if the field 'presume' is False , and display a text "presumé+(only year of birth)" if the variable is TRUE ... please, i make lot of serach about IF THEN statement, but i can't apply it on my report ..
thanx

Edited by dimah77 - 27 Jul 2009 at 5:05pm
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 27 Jul 2009 at 3:38pm
if {table.date_naiss}=False then totext({table.datefield},"mm/dd/yyyy" else
if {table.date_naiss}=True then "presume " + totext({table.datefield},"yyyy") else "NO CONDITIONS MET"
IP IP Logged
dimah77
Newbie
Newbie


Joined: 27 Jul 2009
Online Status: Offline
Posts: 3
Quote dimah77 Replybullet Posted: 27 Jul 2009 at 4:45pm
Thanx Dblank ;
When I try to Put the Expression and test it, it tell me that "The result of the formula must be a boolean value"

Edited by dimah77 - 27 Jul 2009 at 4:45pm
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 27 Jul 2009 at 4:56pm
Do not place it in the Select Statement.
Right Click on the formula Field and select NEW.
Add a name like "DOB Text"
add the formula from above.
Drop it on the Detail section to validate it.


Edited by DBlank - 27 Jul 2009 at 4:57pm
IP IP Logged
dimah77
Newbie
Newbie


Joined: 27 Jul 2009
Online Status: Offline
Posts: 3
Quote dimah77 Replybullet Posted: 27 Jul 2009 at 5:04pm

Thanx a Lot , finally it work
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.031 seconds.