Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: the string is non-numeric Post Reply Post New Topic
Page  of 2 Next >>
Author Message
chudok
Groupie
Groupie


Joined: 18 May 2010
Online Status: Offline
Posts: 70
Quote chudok Replybullet Topic: the string is non-numeric
    Posted: 27 Jun 2011 at 9:13am
I have the following formula.  I am having to upgrade our MRP system and one of my custom reports has the following error in this code (the red highlighted section:  the string is non-numeric - how do I put in a if null then 0 statement to this?


NumberVar  CAT4;
IF {SY0_CompanyParameters.ARAgeByDayOrMonth} = "D" Then
    NumberVar  CAT4:=ToNumber({SY0_CompanyParameters.ARAgingCategory4})
Else     NumberVar CAT4:=120 ;

IF {@agedate}-{@InvOrDueDate} >= NumberVar CAT4 THEN
{AR_OpenInvoice.Balance}
ELSE
0.00

I've tried    

NumberVar  CAT4:=if (isnull({SY0_CompanyParameters.ARAgingCategory4}))then 0 else(ToNumber({SY0_CompanyParameters.ARAgingCategory4}))
Else     NumberVar CAT4:=120 ;

still get the same error



Edited by chudok - 27 Jun 2011 at 9:15am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 27 Jun 2011 at 9:24am
more likely you have a value that is not numeric rather than null
try a select statement to find which row it is choking on
 
IP IP Logged
chudok
Groupie
Groupie


Joined: 18 May 2010
Online Status: Offline
Posts: 70
Quote chudok Replybullet Posted: 27 Jun 2011 at 9:26am
I am not sure how to do that.... can you help direct me in the right direction?  It's been a while since I've used Crystal and I am a little rusty......
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 27 Jun 2011 at 9:29am
in the select expert try
NOT(isnumeric({SY0_CompanyParameters.ARAgingCategory4}))
 
IP IP Logged
chudok
Groupie
Groupie


Joined: 18 May 2010
Online Status: Offline
Posts: 70
Quote chudok Replybullet Posted: 27 Jun 2011 at 9:51am
All I get back are blanks(null?).  When I browse the field data it comes back as String Type Length: 3

Not sure where to go from here.....
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 27 Jun 2011 at 9:54am
in that case, in the formula editor do you have a pick list option in the expression editor to re: NULLS?
Set it to "Default values for Nulls'.
IP IP Logged
chudok
Groupie
Groupie


Joined: 18 May 2010
Online Status: Offline
Posts: 70
Quote chudok Replybullet Posted: 27 Jun 2011 at 10:01am
Did that - same problem still "The string is non-numeric"

Leave it at Crystal Syntax too?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 27 Jun 2011 at 10:08am
can you query the DB directly?
IP IP Logged
chudok
Groupie
Groupie


Joined: 18 May 2010
Online Status: Offline
Posts: 70
Quote chudok Replybullet Posted: 27 Jun 2011 at 10:13am
The only tool I currently have to this database is Crystal.  IT does not even have excel out there where I can use that to query the db. I do not have access to SQL either.....

If I can get IT to create a connection to excel will that work for what you are looking for me to do?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 27 Jun 2011 at 10:15am

In the select expert try this

isnull({SY0_CompanyParameters.ARAgingCategory4})
 
do you get the same amount of records as
NOT(isnumeric({SY0_CompanyParameters.ARAgingCategory4}))
 
IP IP Logged
Page  of 2 Next >>
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.