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

Text to Number Formula

Status
Not open for further replies.

TEM3

Technical User
Dec 6, 2004
324
US
Using Oracle 9i Tables and Crystal Reports 8.5:

I have a test results field that is text and is populated with a variety of information {ARRESULT.Result}. For many of the records a number is entered (as text) representing the number of particular tests performed.

I need to create a formula that first tests the field to see if the text is a number (integer) and if so, and not zero, converts the text to numeric and sums the value of the filtered records.

 
Try this in a formula:

//@Convert_Result

if isnumeric({ARRESULT.Result})
then tonumber({ARRESULT.Result})
else 0

You can then sum this formula using the Insert, Summary command.

~Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top