生成包含多个表的报告
我对 jasperserver 和 ireport 完全陌生,但我一直在管理。我今天确实遇到了问题,这是我的问题:我试图显示多个表(可能超过 50 个),其中每个表的第一列中可以有相同的数据。该列的行在行与行之间完全不同。我的意思是:
Value1 x1 y1 z1
Value1 x2 y2 z2
Value1 x3 y3 z3
Value2 x1 y1 z1
Value2 x2 y2 z2
Value2 x3 y3 z3
第一列可以具有相似的相同值。我正在尝试更改它,以便每个第一列都有自己的表,如下所示:
Value1 table
------------
X1 Y1 Z1
X2 Y2 Z2
X3 Y3 Z3
Value2 table
------------
X1 Y1 Z1
X2 Y2 Z2
X3 Y3 Z3
编辑
为了扩展我原来的问题,我通过 SQL 检索的数据全部存储在一个表中。我正在尝试用一些简单的格式来分解该表。我链接了一张图片,希望可以帮助您理解。
这在 Ireport 中可能吗?
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 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.
Is this possible in Ireport?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
理解你想要什么有点困难,但我猜......
UNION ALL
与UNION
的不同之处在于 all 行按所选顺序返回。相比之下,
UNION
对所有行进行排序并丢弃重复项。It's a bit hard to understand what you want, but I'm going to guess...
UNION ALL
differs fromUNION
in that all rows are returned in the order selected.By comparison,
UNION
sorts all rows and discards duplicates.我在另一个论坛上找到了解决方案。
(就我而言)将IP设为一个组。然后在组标题中添加 $Field(ID),然后添加详细信息区域中的其余行。确保您重置为群组。祝你好运!
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!