Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Check for Numeric Value in Crystal Reports

I need to check if a database field contains a numeric value in it. Here is some pseudo code:

if {myField} is numeric
    // do something
else
    // do something else

I'm looking for a function that will allow me to do the check '{myField} is numeric'.

To help, here are some possible values for {myField} and what the result should be:

{myField} = ''          returns false
{myField} = 'abc123'    returns false
{myField} = '123abc'    returns false
{myField} = '123'       returns true
like image 566
Remus Avatar asked Dec 13 '22 18:12

Remus


1 Answers

Using Crystal Syntax

NumericText({field})  //Returns a Boolean

Using Basic Syntax

IsNumeric({field})  //Returns a Boolean
like image 176
John Hartsock Avatar answered Jan 03 '23 06:01

John Hartsock