Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting string to number not working in Crystal 8.5

Status
Not open for further replies.

nateatjourneys

Technical User
Jul 24, 2006
3
US
I have imported a set of data from Blackbaud software and it is imported as string rather than number. The only data in the field is 0,0.25,0.5,1.0, and 2.0. I created a function CDbl ({StsGrdsGrds_1.StsGrdsGrds_1_Awardedcredit})to convert the string to a number, but when I preview it then returns me to the formula editor and states that the string is non-numeric. I occasionally can get it to work by changing the size of the body of the report which makes no sense.

Any help would be appreciated.
Thanks,
 
So you qassume that we know what this FUNCTION is that you created?

And why create a function, just use a formula of:

if isnumeric({table.field}) then
val({table.field})
else
-9999999

Or use a test formula of:

if not(isnumeric({table.field})) then
"!!!!" & {table.field} & "!!!!"
else
totext({table.field})

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top