Because of some issue with highlighting rows, I added following column header to my report:
addColumnHeader(
cmp.filler().setStyle(stl.style().setTopBorder(stl.pen1Point())).setFixedHeight(1))
This solves my issue, but now I always have a Line at the top of each page. What do I need to do, to only display the column header part for each group, but not at page start?
I already use setShowColumnTitle(false) to not display the column titles at page start, but this doesn't work for the column header. Also I couldn't find a way to add anything to the column title band which would be hidden due to setShowColumnTitle(false)
I was able to hide the column header component by adding a
setPrintWhenExpressionto the filler component.and the
ColumnHeaderExpressiononly returns true, if the page number is -1 which will never happen.And with this the column header never prints at the start of each page, but still prints at the start of each group, which is exactly what I needed.