Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Re: Error Post Reply Post New Topic
Author Message
reddy1868
Newbie
Newbie


Joined: 20 May 2010
Online Status: Offline
Posts: 5
Quote reddy1868 Replybullet Topic: Re: Error
    Posted: 08 Jul 2010 at 9:08am
Hi Gurus,
 
I am getting the error 'the remaining text doesn't appear to be a part of formula' when I check the following in a formula. Could you please correct it ? In the below mentioned 'Emp' field is string type and I want to convert it in to number.
 

(IF {X.Emp}= '100' then
{X.Emp}= 'Null'
 else ToNumber({X.Emp}) )
 
Thanks,
Sukumar


Edited by reddy1868 - 08 Jul 2010 at 9:16am
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 08 Jul 2010 at 9:19am

First off, it appears you are trying to set a database field a value, you cannot do that.  If you want to assign a variable a value you use the ":=" , "=" is for comparison.  Here is what I think you want to do.

If {x.Emp} = '100' then 'Null' else {x.Emp}
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 08 Jul 2010 at 9:20am

You cannot insert a Null so you have to use a zero

IF {X.Emp}= '100' then 0 else ToNumber({X.Emp})
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.