The string is non-numeric - Crystal Reports 2011

Hello, I'm getting the following error on my tax invoice form.

The String is Non-Numeric.
This is the formula: tonumber({@QTYOrdered})-tonumber({@QtyDelivered})

Example attached in the Word Document.

Can someone please advise the best solution?

Thanks.
Doc1.docx
jspcAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

frankhelkCommented:
Hmmm - what's the definition of the fields {@QTYOrdered} and {@QtyDelivered} ? I presume them to be of STRING type ...
What is the data they usually contain (list ?)

Just do a simple report with these fields inside (unformatted !), and have a look at the field content. If it contains anything that's not a digit (0-9) or a decimal dot (and possibly a comma), you'll have to strip that out of the string prior to converting it to a number. Easiest way would be to create some function for that (which could return a "number" value as well). Alternatively you could just (temporary) add another data section to your report with just that data in it (that's the way I use for such problems).

P.S.: Attaching some screenshot as MS-Word (.docx) document is not best practice ... MS-Word documents are an easy vehicle for malware (that's why I usually hesitate to d/l them), and they simply wrap unneeded data around the image (not much, I know). I'd recommend to save the screenshot as JPG, PNG or even GIF and attach that.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.