[#13996] - Whitespace caused by lists

Bug report
Project: Severity:
Component: Reproducibility:
Assigned to:

Lists cause whitespaces although nothing needs to be printed. We've created two example reports using the adaptor 'One Empty Record' in order to illustrate the problem. File 'Residual whitespace (problem middle page).jrxml' contains a list in detail band 3.

- The list has 2 records.
- The list height is 0.
- The list cell height is 40
- The list contents is a frame of height 40, but its print-when expression is false.

So nothing needs to be printed, yet whitespace on the page is created, as can be seen in the rendering 'Residual whitespace (problem middle page).jpg'.

When the list appears at the rear of the page, a second page is created. In reports with page breaks, these pages often cause empty pages. That is illustrated in 'Residual whitespace (problem end of page).jrxml' and can be seen in the rendering 'Residual whitespace (problem end of page).jpg'.

We've found a way to prevent the whitespace by setting the frame within the list to height 0. Although the frame has child elements, we do not get errors in the designer and when compiling the report. This solution has been applied to 'Residual whitespace (fix).jrxml' and is shown in 'Residual whitespace (fix).jpg'.

Although we found a way to prevent the whitespace, we are not sure whether this behavior is intende. Our fix feels like a hack.

We want to avoid that in later versions/editions of the library our fix will break or no longer work. Also we want to avoid having to apply a fix if the situation is in fact caused by a bug.

So two questions
(1) Is it normal or is it a bug for a list to leave whitespace like we illustrated?
(2) Is it okay to set the height of the frame to 0 in order to avoid the whitespace?

tcleenewerck_1's picture
Joined: Mar 19 2019 - 7:10am
Last seen: 1 month 3 days ago



unnecessary comment, that I cannot remove ;-)


Correction. We've overlooked a setting 'remove line when blank'. However turning on that setting doesn't solve the issue entirely.

The list in the middle the page behaves correctly. However, at the end of the page the problem persists. A second page is created that is not necessary. I'll upload the new test files.