Are you saying that you have group bands in the sub report?
I can't provide a definitive solution but I have fought many battles with the report engine. In my experience, one of its greatest weaknesses is pagination and space management. I get reports all the time that want to break in the middle of a page because the report engine thinks it's out of page space (or something).
A couple of tips that may help...
When placing a sub report into a report, set the height of the sub report to the minimum (I use 2px).
Wherever practical, make your sub reports force a page break (in title section of the report). This helps the engine stay on track. Depending on your purpose, this may not be an option.
In a sub report, don't waste space and keep it simple. While it's possible to have bands and groups in sub reports, I think it complicates the problem you are having. If you can break things apart, try it that way.
Not that I have solved the problem you have, but my complex reports tend to be built with a shell report containing sub reports with all of the elements I need. All in an attempt to solve pagination/space issues.
Is reporting the weak link? Prolly.
This issue has come up often:
https://forum.awareim.com/d/4054>
I've had some discussion with support (I can't remember if it was public or not) and my take was:
- The original implementation of Jasper Reports was a fairly big lift.
- Jasper reports has evolved to where updating the JR implementation would be another very big task.
- JR has changed its licensing and there are some new complications.
I paid for a support request about a year ago to get a very serious issue fixed (sub reports were not printing in the order applied in design). They fixed it but I don't think they like playing in the JR code (we all have something we hate).
My take is, the Report engine works but does have a few challenges. I would encourage Support to make sure that what IS offered in the report engine works as it should. It's pretty close and a little time spent there would be a good investment in my opinion.