IBM Support

Error: The string is nonnumeric, when running reports that contain formulas that operate on null values

Troubleshooting


Problem

This technote details an error that might occur when converting strings to numbers and a NULL value is returned, when running reports with the Crystal Reports Enterprise Embedded Edition (CEEE) and IBM® Rational® ClearQuest®.

Cause

When a report format contains a Crystal Reports formula that uses the IsNull function to test the value of a short string field whose value is not set, IsNull returns a true value when the report is run in the ClearQuest Windows application, but returns false when the report is run in the ClearQuest Web application.

The error received when using the ToNumber() function might be similar to the following error message:


com.crystaldecisions.report.web.viewer.CrystalReportViewer The string is nonnumeric. Details: errorKind Error in File D:\WINDOWS\TEMP\{15560590-3BBD-4592-BE0B-8A1FFA6CE412}.rpt: Error in formula . 'ToNumber ({ClearQuest.ADDME5})' The string is nonnumeric. Details: errorKind



This error is generated when the value returned is NULL. If all fields have a value other than NULL, then you will not get this error. This formula works as expected and when using the ClearQuest native client.

Resolving The Problem

This issue was a reported defect, APAR PK09762 in ClearQuest, and was resolved in the 7.0 version. If you are using an older version of ClearQuest, upgrade to the latest release.
When a report format contains a Crystal Reports formula that uses the IsNull function to test the value of a short string field whose value is not set, the ClearQuest Web application has now been fixed so that IsNull now returns true regardless of whether the report is run in the ClearQuest Windows application or in the ClearQuest Web application

If you are using an earlier version, you could prevent this error from occurring by updating the values that are currently null to the default value. You could then add a default value hook to that field to prevent null values in the future. A sample hook might look like the following example:
                                                       
If IsNull ({ClearQuest.ADDME5})                                
Then                                                            
0                                                              
Else                                                            
ToNumber ({ClearQuest.ADDME5})




[{"Product":{"code":"SSSH5A","label":"Rational ClearQuest"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Reporting","Platform":[{"code":"PF033","label":"Windows"}],"Version":"2003.06.00;2003.06.13;2003.06.14;2003.06.15","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
16 June 2018

UID

swg21211461