Crystal Report:If-Else If 公式

发布于 2024-10-10 12:28:58 字数 318 浏览 0 评论 0原文

对于水晶报告中的一个字符串字段,我希望编写公式,其中如果该字段为空,则它应该显示为“无值”,否则应该出现实际值

我写的是

Local StringVar x; 如果 {mysp;1.mystringfield} ="" 或 IsNull({mysp;1.mystringfield}) 则 x := "无值"; 其他 x := {mysp;1.mystringfield}

粗体标记显示错误,指出“剩余文本似乎不是公式水晶报告的一部分”

我的公式中有什么不正确的地方?

让我知道更多意见

谢谢

For one string field in crystal report i wish to write up formula where if that field is null, it should display as "No value" else the actual values should come up

What i have written is

Local StringVar x;
If {mysp;1.mystringfield} ="" or IsNull({mysp;1.mystringfield}) then
x := "No value";
Else
x := {mysp;1.mystringfield}

The bold marked shows error saying "the remaining text does not appear to be part of the formula crystal reports"

Whats incorrect in my formula?

Let me know for more inputs

thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

兰花执着 2024-10-17 12:28:58

我认为您需要删除 ; 并将 or 括在括号中:

Local StringVar x; 

If (IsNull({mysp;1.mystringfield}) or {mysp;1.mystringfield} ="") then 
x := "No value"
Else x := {mysp;1.mystringfield}

I think you need to remove the ; and wrap the or in brackets:

Local StringVar x; 

If (IsNull({mysp;1.mystringfield}) or {mysp;1.mystringfield} ="") then 
x := "No value"
Else x := {mysp;1.mystringfield}
秋叶绚丽 2024-10-17 12:28:58
IF Isnull({mysp;1.mystringfield}) Then
  "No Value"
Else
  {mysp;1.mystringfield}
IF Isnull({mysp;1.mystringfield}) Then
  "No Value"
Else
  {mysp;1.mystringfield}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文