[#2731] - page break causes infinite loop

Category:
Bug report
Priority:
Normal
Status:
Feedback Requested
Project: Severity:
Major
Resolution:
Open
Component: Reproducibility:
N/A
Assigned to:
0

Hi,

I have come across a report today.

I have done some research about this but I couldnt find any reason why this occurs.
(Ignore pagination is set to false in report)

There are multiple detail bands in the report (30+)

The report goes into infinite loop because of "page break" usage on one of the detail bands.
When I remove it, it generates fine.

I have debugged the report and there is something I couldnt really tell why JR does it:
Engine calculates "maxBandStretch" variable in JrFillElementContainer class, iterating through band elements.
If maxBandStretch is greater than "availableHeight" it flags the band (subdetail band-only one of them) "willOverflow". (the idea looks fine)

However, element.getStretchHeight() this method is used for evaluating bandStrecth and it is evaluated over 1000 pixel in our case for "page break", so it goes for an infinite loop.

I didnt get the idea why pagebreaks is not considered differently while evaluating maxBandStretch. In the actual filling process it will generate a page break for it, so engine should behave differently when it come across a pb when evaluating bandstretch.

I cant tell exactly whats wrong but I think some changes should be done here.

theceday's picture
Joined: Mar 5 2010 - 4:05am
Last seen: 1 year 4 months ago

7 Comments:

#1
  • Status:New» Feedback Requested
  • Assigned:nobody» teodord

Hi,

We can't help without seeing any of your JRXML report templates.

Thanks,
Teodor

#2

Hi,

Anything new on this one?

Thanks,
Teodor

#3
  • Resolution:Open» Unable to Reproduce
  • Status:Feedback Requested» Resolved
#4

I have the same problem in a different condition.
I'm generating a report in Excel format. The property net.sf.jasperreports.export.xls.one.page.per.sheet is set to TRUE. I included a page break at the end of the last group footer. There's a subreport defined in the Summary band. It works OK, putting the subreport in another sheet.
The subreport as the main report, has a detail band, a group footer band and a subreport (which is a chart) in the Summary band.
If I insert a page break at the end of the subreport's group footer , or if I stick it into the summary before the sub-subreport, the program goes thru an infinite loop, otherwise it works OK, putting the two subreports on the same sheet.

#5
  • Severity:Minor» Major
  • Resolution:Unable to Reproduce» Open
  • Status:Resolved» New
#6
  • Status:New» Feedback Requested

Hi,

Wouldn't it be easier to just send us some files instead of describing them to us?

Thanks,
Teodor

#7

BTW, having the summary on a new page can be achieved without break element but rather with the isSummaryNewPage flag of the report template.

I hope this helps.
Teodor

Feedback