Hidden elements leave blank space behind by default. To avoid this you should set the property isRemoveLineWhenBlank
to true on the element, in this case the frame.
However, if there are other elements that share the same line and are visible, it will not be possible to collapse the space.
manpreet
Best Answer
2 years ago
I am using iReport 4.5.1 to design the JR pdf report. I am using frame component to group few fields in the report. And I am using "Print When Expression" option on the frame to display it only when a particular field is not null.
In the PDF reported generated, Frame and the data displays fine when the field is not null. But when it is null, frame is not displayed on the PDF but it is leaving a huge empty space. I am not able to figure a way to avoid this.
Please let me know if anyone already found a solution to it.
Here is piece from JRXML pasted below.