iReport subreport divided by a page break

后端 未结 1 1574
孤独总比滥情好
孤独总比滥情好 2021-01-06 09:32

The subreport has two Detail bands, the first is \"Title\" and the second is another subreport. These bands are divided from each other on two pages.

I trie

相关标签:
1条回答
  • 2021-01-06 09:51

    Instead of using two bands in the principle subreport, put the title and the second subreport into the same band. Then set the splitType for that single band to "Prevent". That way, the title and data will be kept together and the split will happen before the title if the data will not fit on the page.

    Edit - Preventing the title from repeating:

    Putting the title into the detail band will make it repeat with each set of data. To prevent this, change the printWhenExpression to $V{REPORT_COUNT} == 1. This will cause it to be printed only once, for the first record, and not for each subsequent loop through the datasource.

    0 讨论(0)
提交回复
热议问题