How to use printWhenExpression in JasperReports

后端 未结 4 2076
感情败类
感情败类 2021-01-04 01:49

Can somebody tell me how to use the printWhenExpression of JasperReports?

4条回答
  •  不知归路
    2021-01-04 01:59

    You can also use the static method "Boolean.valueOf(boolean b)". It does exactly the same logic as "($F{mesure}.startsWith("PH") ? Boolean.TRUE:Boolean.FALSE)" and good rule of thumb is don't recreate the wheel.

    Boolean.valueOf($F{mesure}.startsWith("PH"))

    Boolean.valueOf($F{userfd4}).equals("1"))

提交回复
热议问题