我在我的Crystal报表中遇到了一个“Boolean Required”错误。

huangapple go评论55阅读模式
英文:

I'm getting a "Boolean Required" error in my Crystal report

问题

I'm trying to get the Greater Than symbol to display when a result is 1000.

<br>

When going into Format Editor -> Common Tab -> then clicking on X+2 next to Suppress I then add the following line of code to display my result.

if {tblcomplete.Num Res} >= 1000 then ">" + totext({tblcomplete.Num Res}, 0)
else
totext({tblcomplete.Num Res}, 0)

But I am receiving a "Boolean Required" error message when doing so.

How can I fix this error?

英文:

I'm trying to get the Greater Than symbol to display when a result is 1000.
<br>
When going into Format Editor -> Common Tab -> then clicking on X+2 next to Suppress I then add the following line of code to display my result.

    if {tblcomplete.Num Res} &gt;= 1000 then &quot;&gt;&quot; + totext({tblcomplete.Num Res}, 0)
    else
    totext({tblcomplete.Num Res}, 0)

But I am receiving a "Boolean Required" error message when doing so.

How can I fix this error?

答案1

得分: 1

问题出在抑制异常必须返回一个布尔值的事实上。

要控制显示内容,请使用一个公式,而不是抑制表达式。

英文:

The problem is due to the fact that the Suppress exception MUST return a boolean.

To control what is displayed, use a formula -- not a suppress expression.

huangapple
  • 本文由 发表于 2023年5月18日 00:13:08
  • 转载请务必保留本文链接:https://go.coder-hub.com/76274145.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定