Hello everybody,
I've been looking for a solution for this kind of figure many years ago, from ireport designer 2.00 to ireport 6.00++ and i've never found a solution !
Please help, image below :
3 Answers:
I am not sure if it would work as I did not test it, but on top of my head use print when expression.
So maybe use the row count parameter or maybe just cound the rows and use maths to always ensure epxression is true when values is in the half of the row count.
Otherwise if print when messes up the visual of the report, maybe just add expression where when halve of row count is true then "print this" : "" (which wil lbe blank space)
Hoe this helps, if not, then atleast I tried to answer your question.
Well yeah, for odd it would be easy casue the middle of 3 would be 2 and visualy it would look great.
Pair,(even) you need to decided what would be the middle.
So if rowcount = 4
in print when would be =
printVar = (rowcount % 2 == 0) ? rowcount / 2 + 1 : rowcount / 2 (You can decided -1 or + 1 )
Depending on the number data type you use. You could round to the highest or lowest number.
Then in the print when you could state printVar == $V{REPORT_COUNT}
Something like that, you would need to play around a bit