生成包含多个表的报告

发布于 2024-11-25 23:12:08 字数 729 浏览 1 评论 0原文

我对 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.

Multiple Table Example
Link to picture

Is this possible in Ireport?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

耶耶耶 2024-12-02 23:12:08

理解你想要什么有点困难,但我猜......

select * from table1
union all
select * from table2;

UNION ALLUNION 的不同之处在于 all 行按所选顺序返回。
相比之下,UNION 对所有行进行排序并丢弃重复项。

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.

卖梦商人 2024-12-02 23:12:08

我在另一个论坛上找到了解决方案。

(就我而言)将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!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文