I recently had an issue with a subreport of my JasperReports's report in which I was getting the following error:
Subreport overflowed on a band that does not support overflow.
What is happening?
I recently had an issue with a subreport of my JasperReports's report in which I was getting the following error:
Subreport overflowed on a band that does not support overflow.
What is happening?
I fixed the problem, so I thought I'd post my solution here in case someone found it useful.
Things to check:
In my case, I had made a subreport and passed it a datasource that I wasn't actually using (it was an informational subreport not using any data from the datasource).
(the example is an XML datasource but the same concept applies to SQL datasources.)
e.g.
(net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}
).subDataSource("/Order/Note")
Later, the "Note" was turned into an array instead of a single note. Which meant my footer-subreport was trying to repeat twice, thus the footer report was printing twice, making it too high. Thus the error.
I have fixed the error. The solution is to use : Orientation : Landscape Print order : Vertical
The error occurred when i used the Landscape and Horizontal values
Check if your subreport width is higher than your master report's width. If so, decrease the subreport width. Also ensure that you put your subreport in a valid band, like detail. If your subreport overflows, you will get this error when it is inside invalid bands like page footer.