Jump to content
We've recently updated our Privacy Statement, available here ×

Hide text field when null


puperzenkarl

Recommended Posts

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

In Java is null not the same as 0 (Zero) !!!

 

So if you don't want to 0 values you should compare your field against 0 within the PrintWhenExpression

 

Something like this:

new Boolean($F{total}.intValue()>0)   (if it's an integer field)

 

hth

C-Box

Link to comment
Share on other sites

 I know, but that is the problem. The field can be zero on purpose. In this case it would not be visible although it should be in the report. So I have to compare the value with null, but that seems to be impossible, because null fields will be initialized with zero when using java.lang.Integer.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...