jasperreports
jasperreports copied to clipboard
Allow for no total in crosstab groups of only 1 row/column
Currently, for row and column groups you can specify a total as start, end or none.
It would be great to be able to also specify not to use a total if there is only 1 row or column in the group.
This one is a little bit tricky. From a crosstab design perspective, the height of a row group header cell is the sum of the detail cell height and the total cell height, when total position is Start or End. In case the total cell no longer appears when there is only one detail row, the header cell would have to shrink in height. It would have to be smaller than it design time declared height. The problem is that in JR Lib, content never shrinks under its declared size.
But, if I understand correctly, in order to calculate the height of the row group header cell, you need to know how many rows there are, so at that point wouldn't it be possible to set the height to be smaller, not shrink after the fact?