Print When Expression

 I am using a printwhen expression on a particular field that is not working.

The expression is   new Boolean ($F{Field}.equals (""))

However despite the field it's evaluating being null (I know this because I get a null if I display the evaluation field in the report) the field still does not print. I have tried changing to .equals (null) and that doesn't work either.

Any suggestions please.

psratcliff's picture
Joined: Nov 6 2009 - 1:54am
Last seen: 13 years 11 months ago

2 Answers:

new Boolean ($F{Field}.equals ("") || $F{Field} == null)

kchaudhry's picture
4386
Joined: Apr 9 2007 - 6:10am
Last seen: 16 years 5 months ago

use this

( $F{Field} == "" ? $F{field1_value} :$F{field_value2} )

or

( $F{Field} == "" ?  "msg 1" : "msg 2" )

yaminirathaur's picture
Joined: Oct 27 2009 - 1:55am
Last seen: 13 years 11 months ago
Feedback