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

The string is non-numeric 1

Status
Not open for further replies.

IChang

IS-IT--Management
Apr 14, 2006
5
US
Hi,

I am new to CR. I am upgrading reports from CR8.5 to CR 10. The following formula shows " the string is non-numeric" SY0_CompanyParameters.ARAgingCategory4 is highlighed.

{@agedate};
NumberVar Age_m4 := Month(DateSerial (Year ({@AgeDate}), Month({@AgeDate}) -4, 1));
NumberVar Age_y4 := Year(DateSerial (Year ({@AgeDate}), Month({@AgeDate}) -4, 1));

IF{SY0_CompanyParameters.ARAgeByDayOrMonth} = "D" Then
IF{@agedate}-({@InvOrDueDate}) >= ToNumber({SY0_CompanyParameters.ARAgingCategory4})
THEN {AR_OpenInvoice.Balance}
Else 0.00
Else //{SY0_CompanyParameters.ARAgeByDayOrMonth}= "M"

If (Year ({@InvOrDueDate}) < Age_y4) Then {AR_OpenInvoice.Balance}
Else
If (Year ({@InvOrDueDate}) = Age_y4) And (Age_m4 >=Month({@InvOrDueDate}) )
Then {AR_OpenInvoice.Balance}
Else 0.00


I tried to insert a statement->
If isNumeric({SY0_CompanyParameters.ARAgingCategory4}) Then ToNumber({SY0_CompanyParameters.ARAgingCategory4})
Else 0
but I am not sure how to make it fit into the formula, becuase I keep getting other error message

Thank you.
 
Dear Ichang,

Why not use a variable as in
numbervar ARCat4 := If isNumeric({SY0_CompanyParameters.ARAgingCategory4})
Then ToNumber({SY0_CompanyParameters.ARAgingCategory4})
Else 0 ;

Now, in your formula replace any occurrances of the offending field with the variable ARCat4

regards,

ro


Rosemary Lieberman
rosemary-at-microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.

You will get answers more quickly if you read this before posting: faq149-3762
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top