检查 Crystal Reports 中的数值 [英] Check for Numeric Value in Crystal Reports

查看:12
本文介绍了检查 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

我正在寻找一个允许我检查{myField} 是否为数字"的函数.

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

为了提供帮助,以下是 {myField} 的一些可能值以及结果应该是什么:

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

推荐答案

使用 Crystal 语法

Using Crystal Syntax

NumericText({field})  //Returns a Boolean

使用基本语法

IsNumeric({field})  //Returns a Boolean

这篇关于检查 Crystal Reports 中的数值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆