开发者

how should I set <PrintWhenExperssion> value true or false from java code

开发者 https://www.devze.com 2023-01-22 18:01 出处:网络
I want to set <printWhenExpression>![CDATA[Boolean.valueOf(true)]]</printWhenExpressio开发者_StackOverflow中文版n>

I want to set

<printWhenExpression>![CDATA[Boolean.valueOf(true)]]</printWhenExpressio开发者_StackOverflow中文版n>

to Boolean.valueOf(false) when I fill the report according to some conditions. This means I want to set value 'false' in <printWhenExpression> at run time. Can any one help me for this?


Instead of having hard coded value Boolean.valueOf(true)/Boolean.valueOf(false) use a variable which is evaluation to a boolean:

Boolean.valueOf(someVariableOfTypeBoolean)

or

Boolean.valueOf(someMethodThatReturnsBoolean())
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号