Check for Numeric Value in Crystal Reports

匆匆过客 提交于 2020-01-11 09:22:22

问题


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:


Using Crystal Syntax

NumericText({field})  //Returns a Boolean

Using Basic Syntax

IsNumeric({field})  //Returns a Boolean


来源:https://stackoverflow.com/questions/4071098/check-for-numeric-value-in-crystal-reports

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!