如何检查字符串的空值,如果为null,则取消水晶报表中的任何表(how to check null value of a string and if it is null then suppress

编程入门 行业动态 更新时间:2024-10-23 15:21:34
如何检查字符串的空值,如果为null,则取消水晶报表中的任何表(how to check null value of a string and if it is null then suppress any table in crystal report)

我试图压制一个子报告。我想检查一个字符串值是否为null。 如果字符串值为null,则它将被禁止。 我按照以下步骤 -

然后我写了一个类似的公式

如果InStr({EmployeeHist.SpouseName},'')= 0则为'N / A'

但它显示错误公式结果必须是一个布尔人 ..

有人可以帮忙吗?

I am trying to suppress a sub-report.I want to check a string value either it is null or not. If the string value is null then it will suppress. I followed the following steps-

then I wrote a formula like

if InStr ({EmployeeHist.SpouseName},'' ) = 0 then 'N/A'

But its showing a error THE FORMULA RESULT MUST BE A BOOLEAN..

Can anyone please help??

最满意答案

将公式更改为

ISNULL({EmployeeHist.SpouseName})

如果SpouseName为null并且子报表将被抑制,则返回true

change the formula to

ISNULL({EmployeeHist.SpouseName})

this will return true if the SpouseName is null and the subreport will be suppressed

更多推荐

本文发布于:2023-08-03 13:22:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1391393.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:字符串   报表   水晶   null   check

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!