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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Reports Error - The String is non-numeric 1

Status
Not open for further replies.

cyreports

Programmer
May 12, 2010
89
US
I am getting the following error:

"The string is non-numeric"

from this formula:

IF ToNumber({aaUDS7;1.ObsValue}) < 7 and ToNumber({aaUDS7;1.ObsValue}) > 0 then
1
else
0

It specifically highlights this section: ToNumber({aaUDS7;1.ObsValue})
 
Hi,
That error indicates that at least 1 value in that field is not numeric - often that is because of a NULL value, try:

Code:
If Not IsNull({aaUDS7;1.ObsValue})
Then
IF (
ToNumber({aaUDS7;1.ObsValue}) < 7 and ToNumber({aaUDS7;1.ObsValue}) > 0
) 
then
1
else
0





[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
I am getting back the same error message with this change.
 
Try:

If Not IsNull({aaUDS7;1.ObsValue}) and
isnumeric({aaUDS7;1.ObsValue}) Then
IF (
ToNumber({aaUDS7;1.ObsValue}) < 7 and ToNumber({aaUDS7;1.ObsValue}) > 0
) then
1 else
0

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top