【问题标题】:If else condition in iReportiReport 中的 if else 条件
【发布时间】:2015-10-02 03:08:48
【问题描述】:

如果字段为空,我想添加“-”符号。如何在 iReport 中执行此操作?

【问题讨论】:

    标签: if-statement jasper-reports ternary-operator


    【解决方案1】:

    您可以使用三元运算符(?:) 代替“if”。

    尝试将以下代码设置为文本字段表达式。

    (($F{YOUR_FIELD} != "")? $F{YOUR_FIELD}: "-")
    

    【讨论】:

    • 谢谢兄弟。是的,它正在工作。非常感谢。 (Y)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-07-01
    • 1970-01-01
    • 2013-12-14
    • 1970-01-01
    • 2011-11-06
    相关资源
    最近更新 更多