Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Formula error Post Reply Post New Topic
Author Message
figgy
Newbie
Newbie


Joined: 19 Nov 2013
Online Status: Offline
Posts: 23
Quote figgy Replybullet Topic: Formula error
     Posted: 12 Nov 2014 at 7:05am
I am not sure what is wrong with my formula but it keeps telling my a string is requited after "else".  When I first wrote this formula I put 0 instead of not started and it worked fine but I decided to change it and now am getting an error message.

if {Job.Act_Total_Hrs}=0 then "Not Started" else {Job.Act_Total_Hrs}-{Job.Est_Total_Hrs}

Thanks in advance for your help!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 12 Nov 2014 at 8:03am
if {Job.Act_Total_Hrs}=0 then "Not Started" else
totext({Job.Act_Total_Hrs}-{Job.Est_Total_Hrs})
 
you may also need ot foramt the totext() depending on how you want it to display


Edited by DBlank - 12 Nov 2014 at 8:03am
IP IP Logged
figgy
Newbie
Newbie


Joined: 19 Nov 2013
Online Status: Offline
Posts: 23
Quote figgy Replybullet Posted: 12 Nov 2014 at 8:54am
Thank you!  
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