I am using Sage 50 (formerly Peachtree) Quantum 2013, Crystal Reports 2008 and a pervasive database.
I created a report to convert the number of units sold to ounces.
One field in the inventory item record stores the number of ounces and another field stores the number of units in a case.
My formula to convert the units sold to ounces is:
(If isnull({LineItem.CustomField1}) then 0
else If {LineItem.CustomField1} = "can" then 1 * ToNumber({LineItem.CustomField2})
else [highlight #FCE94F]ToNumber({LineItem.CustomField1})[/highlight] * ToNumber({LineItem.CustomField2}))
When the report is processing, an error occurs: The string is non-numeric
and highlights ToNumber({LineItem.CustomField1}) in the 3rd line of the formula shown above.[highlight #FCE94F][/highlight]
Some Custom Field #1's do not have a value in them, others have "can" and others have a numeric number.
Does anyone know how I can correct the formula so the error message doesn't appear?
I created a report to convert the number of units sold to ounces.
One field in the inventory item record stores the number of ounces and another field stores the number of units in a case.
My formula to convert the units sold to ounces is:
(If isnull({LineItem.CustomField1}) then 0
else If {LineItem.CustomField1} = "can" then 1 * ToNumber({LineItem.CustomField2})
else [highlight #FCE94F]ToNumber({LineItem.CustomField1})[/highlight] * ToNumber({LineItem.CustomField2}))
When the report is processing, an error occurs: The string is non-numeric
and highlights ToNumber({LineItem.CustomField1}) in the 3rd line of the formula shown above.[highlight #FCE94F][/highlight]
Some Custom Field #1's do not have a value in them, others have "can" and others have a numeric number.
Does anyone know how I can correct the formula so the error message doesn't appear?