Check for Numeric Value in Crystal Reports

2020-04-07 19:09发布

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

1条回答
戒情不戒烟
2楼-- · 2020-04-07 19:21

Using Crystal Syntax

NumericText({field})  //Returns a Boolean

Using Basic Syntax

IsNumeric({field})  //Returns a Boolean
查看更多
登录 后发表回答