Jump to content
JasperReports Library 7.0 is now available ×

Remove line when NOT Blank?


Recommended Posts



We have a requirement in our project to display a BOX when the text field is Empty. When the text field is having data, it should not have any border.


I found two options to cater this requirement.


1) "conditionalStyle" - This allows me to conditionally display the border but I have to write style for every textfield in the report. I will not be able to use the Style Template also in this case as conditionalStyle cannot be declared in it.


2) "printWhenCondition" - This option allows me to display a empty Static text field with border whenever the value of the text field is Empty. But problem here is I should have a dummy static text field for every element and have conditions assigned to them.


Is there a elegant way of doing this in Jasper reports?

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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...