Remove line when NOT Blank?


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?
nvenky's picture
Joined: Nov 28 2007 - 8:04am
Last seen: 15 years 6 months ago

1 Answer:

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


Conditional styles cannot use contextual information about the report elements. If you think this should be supported, please post a feature request.

lucianc's picture
Joined: Jul 17 2006 - 1:10am
Last seen: 1 hour 25 min ago