Subreport causing infinite loop

11,085

Solution 1

Just from trial and error I've found out that the problem is caused by the detail band in the second subreport. Something about having the fields in there is causing an infinite loop. I put it in the column header band and it fixed it.

Solution 2

i just found a solution for that issue, the sub report was contained in the band (column header) , i moved the sub report to another band (summary) then it resolved

Share:
11,085
Graham
Author by

Graham

Updated on June 04, 2022

Comments

  • Graham
    Graham almost 2 years

    I have a report with a subreport and then a subreport within that subreport. Somewhere along the way jasper reports is getting stuck in an infinite loop.

    I've looked at the total number of objects I'm passing to it and it is 1 object to the report, which contains an arraylist of 2 objects for the first subreport. Then once inside the first subreport each of the objects passed to it has an additional arraylist with 6 objects in the first and 20 objects in the second, which are then passed to the second subreport.

    It seems that it keeps accessing the two objects in the first subreport. Like it just infinitely loops through them, which then causes it to infinitely loop through the arraylist that is in each one.

    I've looked through my code in java and nothing seems to be wrong. I've messed with tons of settings on the subreports themselves and the subreport object that links to them but nothing has worked. Any idea what could be going on?

  • Raul Rene
    Raul Rene over 11 years
    This did not work for me, unfortunately. I am 100% sure it is a minor thing somewhere, as I have other sub-reports in the application that work fine. For a certain report, it gets in an infinite loop. If anyone finds another solution to this, it would be great.
  • thewaywewere
    thewaywewere almost 7 years
    Welcome to SO. Please read this how-to-answer and follow the guideline there to provide quality answer.