pals!
I have a very special requirements for my report. Let's look at report at first:
___________
| |
| header |
| |
| row |
| row |
| row |
| footer |
| footer |
|_________|
This is my typical page in perfect case with all rows, header and footer on same page. Sometimes I have too many rows for one page and my report looks like this:
__________
| |
| header |
| |
| row |
| row |
| row |
| row |
| row |
|________|
__________
| row |
| row |
| row |
| row |
| row |
| row |
| row |
| footer |
|________|
__________
| footer |
| |
| |
| |
| |
| |
| |
| |
|________|
And I can't just insert splitter between last row and footer because my requirements is: - Headers page must have at least one row - Footers page must have at least one row
So, I can' find solution to this problem. My footer can be splitted in two pages. My footer can be without rows and this is very bad for printing XLS file. I can use PDF instesad of XLS, but I have same problems. Does anybody have ideas how to solve this problem?
-----=== UPDATE ===-----
So, mr. dada67 provides great solution. We can put group into document and group will do what we need with expression = '1' (Looks like we select all elements). But there are some update to my question.
What if my every row is and subreport with some rows inside? When I use group in master report, Jasper process my every subreport with all his rows as an single row. Can I force Jasper to think that single element is not an whole subreport element but a single row from subreport?
-----=== UPDATE 2 ===-----
So, solution is here. When you need to move last row of your last subreport to next page with some footer - you just need to create group inside subreport with espression = '1' (to gather all rows) and settings from correct answer from dada67. This force jasper to draw footer after every subreport, but you can hide footer in all subreports except last.
Thanks to dada67!