Subreport causing infinite loop

匿名 (未验证) 提交于 2019-12-03 00:59:01

问题:

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?

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



回答2:

same thing happened to me but with the same date for exp. 10 august 2014 - bla bla... when I shorten the date period there is no problem but when I tried to take 2 months of report with that starrting date, "Infinite loop creating new page due to column header overflow" message came with error. I am started thinking about a data corruption with that specific date of 10 august 2014. I am confused with that.

**If you have a chance, and If you have subreport(s) in column header, move them to the summary band. I read some solution on this case from some one **

link : http://community.jaspersoft.com/questions/543302/receive-infinite-loop-creating-new-page-due-column-header-overflow-exception



回答3:

On the subreport delete unnecesary bands, for example to delete all bands except column header. On the principal report adds subreport on Column Header band



回答4:

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



回答5:

For JasperReports Studio 6.2.2 I was facing the infinite loop exception.

  1. Subreport should not be in column header band.
  2. java version(openJDK) should be proper. In JasperStudio reports do work but when deployed in environment it looks for openJDK version installed.Version should be based on environment version for ex. v2017 - openJDK 1.8.0.111


标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!