如何基于多个数据集创建BIRT报告 [英] How to create BIRT report based on multiple data sets

查看:242
本文介绍了如何基于多个数据集创建BIRT报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在创建BIRT报告时需要帮助; 情况是我有多个查询,但报告的所有列都应按一个列分组,例如(操作员),如:

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 :

op1 | ## | ## | ## | ## |

op1 | ## | ## | ## | ## |

op2 | ## | ## | ## | ## |

op2 | ## | ## | ## | ## |

op3 | ## | ## | ## | ## |

op3 | ## | ## | ## | ## |

我该怎么做? 我试图使运算符分离数据集,并将其放在第一列中,并在所有查询中添加一个参数(即(where(operator =?)),以从运算符列的当前行获取运算符..但是我可以不要将每个数据集中的参数值附加到Operator数据集数据集. 这个策略对吗? 如果是的话..我该怎么做. 如果否,正确的策略是什么? 预先感谢一百万,

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,

推荐答案

如果您的多个数据集来自同一数据源,则建议合并查询.

If your multiple datasets are coming from the same datasource, I recommend combining the queries.

如果多个数据集来自不同的数据源,则可以使用BIRT中的联合数据集"功能将它们链接在一起.

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:

  1. 在BIRT报表设计器的数据资源管理器"窗格中右键单击数据集",然后选择新建联合数据集".
  2. 在新建联合数据集"对话框中,从左侧列表中选择要连接的数据集和字段(此处为操作员).
  3. 从两个列表之间的选项中选择联接类型(内部,左外部,右外部,全外部).
  4. 在右侧列表中选择要连接的数据集和字段(此处再次是运算符).
  5. 在对话框底部的选项中,为生成的新数据集提供一个有意义的名称.
  6. 单击完成.
  7. 在编辑数据集"对话框中编辑结果数据集以根据需要产生输出.

您只能从不超过两个的现有数据集中生成联合数据集.但是,联合数据集本身可以作为其他联合数据集的输入数据集包含在内-因此,如果需要将三个数据集联合在一起,可以通过将两个数据集链接到一个联合数据集中,然后根据第一个联合数据集创建新的联合数据集来实现联合数据集和第三个原始数据集.

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.

不必参数化任何现有查询即可加入数据集.仅在旨在限制该数据集中返回的运算符(例如,仅返回100-121的运算符)的情况下,才应包括查询中关于运算符的参数条件.

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报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆