Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: if statement Post Reply Post New Topic
Author Message
kezza
Newbie
Newbie


Joined: 08 Mar 2012
Location: Netherlands
Online Status: Offline
Posts: 19
Quote kezza Replybullet Topic: if statement
     Posted: 10 Oct 2012 at 2:13am
Hello everybode,
 
I have created a report and want to make a textbox which will only give a result of a field when the value of another field is less than 30.
 
I've inserted a textbox and  in the text formatting editor i choose on the xi2 button to create the if statement.
 
the if statement which I am using is
if {@Old} < 30 then {Command.xxxx}
 
so @old is a formula and when this value is less than 30 then it must show the value of the field command.xxxx
 
when i am using above formula it returns an error that the formula result must be a string.
 
Thank you in advance.
IP IP Logged
BrianJBean
Newbie
Newbie


Joined: 09 Oct 2012
Location: United States
Online Status: Offline
Posts: 3
Quote BrianJBean Replybullet Posted: 10 Oct 2012 at 2:55am

then "", &'{Command.xxxx}'

 
I just posted this in another thread, I don't recall if you need the single quotes or not, but that's how you change your output to a string type
IP IP Logged
comatt1
Senior Member
Senior Member
Avatar

Joined: 19 May 2011
Online Status: Offline
Posts: 337
Quote comatt1 Replybullet Posted: 10 Oct 2012 at 4:13am
just put totext({Command.xxxx})
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