Infinite loop due to page header overflow

JasperReports 1.2.2
Oracle 9.2.7

Alrighty, I have a bit of a problem on my hands. I have a report that has seven subreports, each producing their own tables having a header, title, detail and footer band. When running this report on a smaller dataset, all is well. However, once in production and the report deals with tens of thousands of records, it gives me the "Infinite loop creating new page due to page header overflow" error. Why would this be an issue just because I have a larger dataset? I've had the pages overflow on a consistent basis before, but now that its much larger it seems to have a problem. Is there anything I can do to relieve this issue, or am I stuck having to pull each subreport out into its own separate report (which does work, but its very un-user friendly).

Thanks
page80's picture
16
Joined: Aug 2 2006 - 1:28am
Last seen: 16 years 10 months ago

4 Answers:

Hi,

This is a report template layout problem.
It occurs only with large datasets simply because in large documents there's a bigger chance for that subreport page header to overflow at some point, depending on how the various subreports chain up.
But it could occur with small datasets too.
Is just about anticipating it during the report design phase.

What the error message says is that you probably have a large page header in one of your templates or that page header stretches. And when it does, it overflows onto the next page and there, it has to print again (it is the page header right?). So it overflows again... and again and again and again...
There is nothing the egine can do. Just note that page header are not usually meant to strech and especially not designed to overflow.

You just have to reconsider your report layout.

I hope this helps.
Teodor
teodord's picture
47330
Joined: Jun 30 2006 - 9:00am
Last seen: 10 hours 8 min ago

hi...

it's simple solution,
if before get the error you place the subreport in the header band,
now just place it over to details band,
so that your main report will be run well ^__^



Post Edited by lukmanars at 07/29/2011 09:36
lukmanars's picture
473
Joined: Jul 29 2011 - 2:28am
Last seen: 11 years 10 months ago

Thank you! This helped!

kalypsonika - 9 years 5 months ago

I had this error today

net.sf.jasperreports.engine.JRRuntimeException: Infinite loop creating new page due to page header overflow.
        at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillPageHeader(JRVerticalFiller.java:410)
        at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:253)
        at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:119)

My report has a Main report that contains just 1 subreport.

The issue I had was that I mistakenly uploaded the Main report jrxml file on top of the subreport's jrxml file (they are similarly named in my GIT repo).

So the recursion was that it was trying to run the main inside the main inside the main inside the main leading to the recursion error.

Re-uploaded the correct file into the subreport and then the recursion issue went away.

rick_whitescarver's picture
Joined: Nov 25 2015 - 5:00am
Last seen: 12 months 3 days ago

Dear Developers,

Just you need to write groovy on Print When Expression that "$V{PAGE_NUMBER}.equals(1)" on column header property.

this is happend when you drop subreport in detail section so the column header in jasper repeat twice. so you have to tell column header to not repeat again with subreport.

Kind Regards,

Muhammad Yasir Sohail

m.yasir21's picture
153
Joined: Nov 9 2017 - 10:47pm
Last seen: 4 years 4 months ago
Feedback