ray_lukas Posted August 20, 2014 Posted August 20, 2014 I am new to Jasper Reports. So far so good. But my first report has a complicated layout and I don’t honestly see a way to do this, even after hunting around tutorials and this forum.I need to layout items horizontally in three columns. Each item itself contains multiple fields, three to be exact. Line One contains Item One, Two, and Three, Line Two contains Item Four, Five, and Six, etc. Each Item contains three fields.If this was Java I would have two loops, one for every item, the inner loop for each of the three fields that make up an item with a count for the number of items per line. Inner loop contains print until the inner loop is exhausted then println and continue for all the items that I need to print.When I look at the report I need each of the fields in the “columns” to line up, field one across all vertical columns line up, same with field two, and field three. Which means the max size of the combined three fields in the dataset needs to also be known.How can this be done in Jasper Reports? There must be a trick.Can you help me out.
calculate.machine Posted February 12, 2015 Posted February 12, 2015 Jasper supports vertical data layout with multiple columns. But you want to layout them horizontally and orderly in three columns, which Jasper doesn’t support. Yet you can use esProc to help this. With the following code, the SQL result set with 3 fields can be rearranged and combined horizontally in 9 fields. What Jasper will do is simply to display the result. Jasper can connect to esProc script through JDBC. It calls the script in a same way as that in which it calls the stored procedure. For more details, see http://esproc.blogspot.com/2015/02/esproc-assists-report-development_10.html .
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