Collapse Text field in Jasper

I have a column header band and a detail band which consists of some text fields. These text fields will be printed based on a condition.

So, for this I have set the condition in Print When Expression and this works fine, but the problem is that this non-printed text field still occupies space, as a result I get to see white/blank space inside the report.

How can I make the text fields to collapse so that the ones which are printed don't have any white space in-between?

PS: I've set a condition in Print When Expression, and set Remove Line When BlankBlank When NULL and Stretch With Overflow to true.

jitin.dominic01's picture
Joined: Apr 26 2018 - 4:37am
Last seen: 3 years 2 months ago

3 Answers:

Are you using a table component?

If it's a table, you can select the column, and modify the "Print When" property of that column, rather than the "Print When" of textfields.

riodavid's picture
2433
Joined: Oct 27 2016 - 1:57am
Last seen: 4 years 4 months ago

@riodavid

I tried using a table component, but somehow my table compoent is not able to populate the data. It always comes blank. 

That's why I had to stick with the Text-Fields alternative.

I'm still a newbie, I tried to resolve the table issue, but wasn't able to resolve it.

jitin.dominic01's picture
Joined: Apr 26 2018 - 4:37am
Last seen: 3 years 2 months ago

Try to learn how to display data in a table first. I think there're some videos on youtube telling people how to do that.

riodavid's picture
2433
Joined: Oct 27 2016 - 1:57am
Last seen: 4 years 4 months ago
Feedback