如何基于多个数据集创建 BIRT 报告
我需要帮助来创建 BIRT 报告; 情况是我有多个查询,但报告中的所有列应按一列分组,例如(运算符),例如:
运算符|表达式1 |表达式2 |表达式3 |表达式4 |
OP1 | ## | ## | ## | ## |
OP2 | ## | ## | ## | ## |
OP3 | ## | ## | ## | ## |
我怎样才能做到这一点? 我试图使操作员单独的数据集并将其放在第一列中,并在所有查询中添加一个参数,即(其中(操作员=?))以从操作员列的当前行获取操作员。但是我可以不将每个数据集中的参数值附加到 Operator dataset 数据集中。 这个策略对吗? 如果是的话..我该怎么做。 如果不是,正确的策略是什么? 预先致以万分感谢,
I need help in creating a BIRT report;
the situation is that I have multiple queries but the report all columns should be grouped by One column for example (Operator) Like :
Operator | Expr1 | Expr2 | Expr3 | Expr4 |
op1 | ## | ## | ## | ## |
op2 | ## | ## | ## | ## |
op3 | ## | ## | ## | ## |
How can i accomplish that ?
I 'm trying to make the Operator separate data set and put it in the first column and add a parameter in all quires i.e (where (operator = ?)) to get the Operator from the current row of operators column..But I can not attach the parameter value in each dataset to a the Operator dataset data set.
Is this strategy right ?
If yes .. how can I do that.
If no, what is the correct strategy?
Million thanks in advance,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您的多个数据集来自同一数据源,我建议组合查询。
如果多个数据集来自不同的数据源,您可以使用 BIRT 中的联合数据集功能将它们链接在一起。
要将两个单独的数据集链接在一起:
您只能从不超过两个现有数据集生成联合数据集。但是,联合数据集本身可以作为其他联合数据集的输入数据集 - 因此,如果您需要将三个数据集连接在一起,可以通过将其中两个数据集链接到一个联合数据集,然后基于第一个数据集创建一个新的联合数据集来实现联合数据集和第三原始数据集。
无需对任何现有查询进行参数化即可连接数据集。仅当意图限制该数据集中返回的运算符(例如仅返回运算符 100-121)时,才应包含查询中运算符的参数条件。
If your multiple datasets are coming from the same datasource, I recommend combining the queries.
If the multiple datasets are coming from different datasources, you can link them together using the Joint Data Set functionality in BIRT.
To link two separate datasets together:
You can only produce joint datasets from no more than two existing datasets. However, joint datasets can themselves be included as input datasets for other joint datasets - so if you need to join three datasets together, this can be achieved by linking two of them into one joint dataset, then creating a new joint dataset based on the first joint dataset and the third original dataset.
It is not necessary to paramterise any of the existing queries to join datasets. A parameter condition on Operator in the query should only be included if the intention is to restrict the Operators returned in that dataset (eg. to return operators 100-121 only).
您当然可以根据需要在 BIRT 报告上创建任意数量的数据集。从那里您可以创建联合数据集,从而创建统一的数据视图。您的数据集中是否有一个允许您创建连接的公共字段?
如果您无法创建联合数据集,我建议您设置脚本数据集。脚本集依赖 POJO 来聚合数据并应用生成所需的统一视图所需的业务逻辑。从那里您可以将 POJO 中的数据读入报告中,然后就一切就绪了。
You can certainly create as many data sets on a BIRT report as you need. From there you can create joint data sets that create a unified view of the data. DO you have a common field amongst your data sets that can allow you to create the join?
If you cannot create the joint data set, I would recommend setting up a scripted data set. The scripted set relies on a POJO to aggregate the data and apply the business logic necessary to produce the unified view you need. From there you read the data into the report from the POJO and you are all set.