Jump to content

Subreport and infinite loop error


silversoft

Recommended Posts

I have created a simple master report containing a simple sub report.

The subreport is within the master report's detail band.

The subreport is filled using an own JRDataSource.

When the report is generated I get an infinite loop with a StackOverflow error.
This only happens when I have so much data that the subreport overflows.
Otherwise it works just fine. How can I get the subreport to span over multiple pages?
How can I solve this? Thanks in advance.

Attached are the report files.

This is the java code that is used to fill the report:

Code:


Post Edited by silversoft at 05/05/2010 09:44
Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Strange, your reports work fine for me.  I'm using for the subreport a data surce that produces short random strings.

Do you think you can upload a self-contained test case to reproduce this?  Or you could enable debug logging for JR (e.g. set log4j.logger.net.sf.jasperreports=debug if you're using Log4j), that might shed some light on what happens during the report fill.

Regards,

Lucian

Link to comment
Share on other sites

I got it to work in an isolated set up only including the jars that is needed.

However i can't get it to work in our real application and I can't figure out why.

When I analyzed the log, I could see that the difference was that the JRContinuationSubreportRunner was used instead of JRThreadSubreportRunner.

I have tried to set the property net.sf.jasperreports.subreport.runner.factory to net.sf.jasperreports.engine.fill.JRThreadSubreportRunnerFactory according to the documentation, but that doesn't help.

When I changed the property value in the file default.jasperreports.properties in jasperreports-javaflow-3.7.2.jar I got this to work.

However, this sholdn't be the right place to do this in. Any suggestions?

 



Post Edited by silversoft at 05/06/2010 14:11



Post Edited by silversoft at 05/06/2010 14:35
Link to comment
Share on other sites

Where did you set net.sf.jasperreports.subreport.runner.factory?

If you don't intentd to use Javaflow continuations for subreports, you should use the standard JR jar (jasperreports-x.y.z.jar) instead of the jasperreports-javaflow-3.7.2.jar.

Link to comment
Share on other sites

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...