j2eealidev Posted November 18, 2017 Share Posted November 18, 2017 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 :https://imgur.com/a/xwE1B Link to comment Share on other sites More sharing options...
joseng62 Posted November 21, 2017 Share Posted November 21, 2017 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. Link to comment Share on other sites More sharing options...
j2eealidev Posted November 23, 2017 Author Share Posted November 23, 2017 Hello, Thank you for your return, however, your solution could work only if the numbers of lines are : ODD, what about if numbers of lines are pair ?? ODD = example : 3 5 7 9 ...Pair = example : 2 4 6 8 10 12... Link to comment Share on other sites More sharing options...
joseng62 Posted December 4, 2017 Share Posted December 4, 2017 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 = 4in 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now