简体   繁体   中英

Subreport causing infinite loop

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?

我刚刚找到了该问题的解决方案,子报告包含在乐队(列标题)中,我将子报告移动到另一个乐队(摘要)然后它解决了

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.

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

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM