How to use printWhenExpression in JasperReports

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

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

4条回答
  •  [愿得一人]
    2021-01-04 02:14

    The other poster has done a good job of explaining the technical details of how to use it, so I'll try and explain the circumstances in which one might find it useful.

    Basically, it allows you to show or hide the contents of a cell based on a boolean expression. For example, you might want to show a person's name only if that person is over 18, then in the name field, using a printwhenexpression like:

    $F{age} >= 18
    

提交回复
热议问题