Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Field is a string but answers are numbers Post Reply Post New Topic
Author Message
jaykav99
Newbie
Newbie


Joined: 07 Apr 2009
Online Status: Offline
Posts: 14
Quote jaykav99 Replybullet Topic: Field is a string but answers are numbers
     Posted: 17 Nov 2009 at 7:29am
Answers1 of my company is the width of our blinds. So every answer is a number but of course answer1 is seen as string by crystal. I need a report to give me every line item with answer1 greater than or equal to 108. But the report is showing me everything.  If i just do equal to 108 it works fine. but again only gives me exactly 108 orders. Is there a way around this?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Nov 2009 at 7:34am
tonumber(field)>=108
IP IP Logged
jaykav99
Newbie
Newbie


Joined: 07 Apr 2009
Online Status: Offline
Posts: 14
Quote jaykav99 Replybullet Posted: 17 Nov 2009 at 7:44am
I did see that function but wasnt familiar with how to use it. But now i am getting an error. "that string is non-numeric"
IP IP Logged
jaykav99
Newbie
Newbie


Joined: 07 Apr 2009
Online Status: Offline
Posts: 14
Quote jaykav99 Replybullet Posted: 17 Nov 2009 at 7:45am
Should i try the numeric text function?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Nov 2009 at 7:51am
do you have any rows where a user put an alpha in the field?
You can test this by using
IsNumeric(field)
Any returns of False will find these rows. Assuming they exist what kind of data is in there and how do you want to handle those fields? Just exclude them or something else?
IP IP Logged
jaykav99
Newbie
Newbie


Joined: 07 Apr 2009
Online Status: Offline
Posts: 14
Quote jaykav99 Replybullet Posted: 17 Nov 2009 at 8:52am
I got it now, my coworker found some help files detailing what to create. It looks to me basically what your were saying but it just wast clicking in my head.
 
So first i created a formula with this
 
if NumericText ({saw_orderitem1.Answers1}) then ToNumber ({saw_orderitem1.Answers1}) else 0
 
Then i took that formula and said greater or equal to 108 in my search fields.
 
Thanks for the help!!!
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