Jump to content
Changes to the Jaspersoft community edition download ×

infinite loop on "non-splitting band" problem


Recommended Posts

First let me preface by saying I'm not a jasper reports expert, just the one stuck trying to diagnose and fix this problem. I am familiar with jasper, but I'm not the one that usually does all the reporting side of our app. I'll try to fill in as much data as I've been able to gather to this point.


We have some basic reports done with iReport that consist of one Master report that includes a few sub-reports that we are kicking out as PDF for users to download from our website. We've got one particular dataset that is resulting in an infinite loop of:


"[net.sf.jasperreports.engine.fill.JRFillSubreport] The subreport is placed on a non-splitting band, but it does not have a rewindable data source."


This eventually brings our app down at which point it has to be killed and restarted.


The subreports are all in the "detail" band of the Master report, which is marked Split Allowed=true. The detail band itself in the sub-reports are also all marked splittable.


The specific problem seems to be related to a particular textField in the second subreport part of the master report that causes the subreport to flow off the end of the page if "too much" text is filled in. However, we've been able to create a report where the data severely overflows the end of the page and had the report successfully complete, so I'm not sure why this is only happening with this one particular set of data.


The text itself is nothing out of the ordinary. It's about 300 bytes of perfectly ordinary text spanning about eight lines vertically. (i.e. no funky control characters or unicode chars or anything)


I've tried compiling and re-running the reports with both iReport 1.2.5 and 1.3.1 and running against jasper reports 1.2.5 and 1.3.0, just to see if it might be related to some bug in one or another version and I get the same results.


I've tried setting "Stretch Type" to all possible settings for the textField to no avail.


I've tried placing the subreports into their own bands, and we still get the same problem. (It seems to be specifically related to the one subreport. If we remove the subreport, or the textField, we can print this record with no problems.) I've also tried putting the different elements of the subreport into their own bands, but we still get the same loop and eventually have to kill it.


Stepping through the debugger it appears that after the first subreport is processed, jasper is looking forward to the second subreport, deciding that it is going to overflow the page and closing out the current page and pushing the second subreport to the next page. Whereupon it decides it will overflow this page and closes out this page and pushes it to the next, ad infinitum.


The thing that has me utterly confused is that I have checked both in iReport and by looking at the jrxml files directly that ALL the bands in ALL the reports are marked "Split Allowed=true" so where is that error coming from.


Further, we can recreate the circumstances only by using _exactly_ the same text as the one record that is giving us fits. If we try putting some arbitrarily long amount of text in the field to cause the report to go off the end of the page, it outputs to PDF just fine. If we remove any single line from the text of the problem record, it outputs to PDF just fine. There seems to be some specific set of circumstances related to the particular text that we have that is somehow freaking out jasper reports when it tries to output the subreport to PDF.


If there is any more information I can give to help solve this problem, please let me know.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...