Generate a report with multiple tables
I'm completely new to jasperserver and ireport, but I've been managing. I did reach a block today and here is my problem: I'm trying to display multiple tables (maybe 50+) where each table can have the same data开发者_Python百科 in the first column. The row for that column is entire different from row to row. By this I mean the following:
Value1 x1 y1 z1
Value1 x2 y2 z2
Value1 x3 y3 z3
Value2 x1 y1 z1
Value2 x2 y2 z2
Value2 x3 y3 z3
This can have the first column with similar the same value. I'm trying to change it so that each first column has its own table like so:
Value1 table
------------
X1 Y1 Z1
X2 Y2 Z2
X3 Y3 Z3
Value2 table
------------
X1 Y1 Z1
X2 Y2 Z2
X3 Y3 Z3
Edit
To expand on my original question, the data I'm retrieving via SQL is all stored in one table. I'm trying to break up that table with some simple formatting. I've linked a picture to hopefully ease your understanding.
Link to pictureIs this possible in Ireport?
It's a bit hard to understand what you want, but I'm going to guess...
select * from table1
union all
select * from table2;
UNION ALL
differs from UNION
in that all rows are returned in the order selected.
By comparison, UNION
sorts all rows and discards duplicates.
I found the solution on a different forum.
(In my case) make the IP a group. Then in the group header add the $Field(ID) and then the rest of the rows in the detail band. Make sure you reset on group. Good luck!
精彩评论