配置和动态生成BIRT报告 [英] Configuring & Generating BIRT Reports Dynamically

查看:123
本文介绍了配置和动态生成BIRT报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过观看YouTube视频(分为2部分)和仔细阅读BIRT手册,我对它的理解是:

  • 在Eclipse中创建新报告
  • 使用BIRT报告设计器(Eclipse插件)设计报告
  • 使用数据源(JDBC驱动程序和数据库)和数据集(特定表)填充报告
  • 生成/导出/打印报告

这个工具看上去很酷,但是我找不到任何文档,这使我相信这是一个 Java 工具,而不是 Eclipse- 工具(意味着,它具有Java API并可以与Java应用程序进行交互,与纯Eclipe插件相反,后者需要通过Eclipse IDE进行手动/人机交互.

具体来说,我想确认BIRT是否可以执行以下操作:

  • 以编程方式配置报告(布局,UI小部件放置,数据源/集等);也就是说,就像JasperReport API具有生成JRXML的iReport设计器一样,BIRT是否也是如此?
  • 通过Java API启动报告生成",从而可以实时读取数据并填充报告,并且可以将报告发送或存储在文件系统中
  • 创建同一报告的HTML和PDF版本

解决方案

回答您的问题:

  1. 是的. BIRT可能没有JasperReports强大,但是它可以满足大多数常见需求. BIRT设计器会在JasperReports中生成一个类似于JRXML的.rptdesign文件.

    关于您的问题:BIRT几乎可以通过编程实现所有功能. BIRT报表引擎API 是您入门的最佳来源您提到的功能.它为每种功能提供了很好的示例.

  2. 不确定. BIRT通常从数据库中获取预先保存的数据并生成报告.尽管借助某些外部库,您仍可以看到实时数据表示形式(可能是闪存图的形式)(请参阅 irendertask .

获得更多信息/答案的来源:

  1. 网站上提供了几个示例报告.快速浏览它们可能会为您提供更多见解.

  2. 有关讨论和疑难解答,请参考 eclipse社区论坛 BIRTExchange (BIRT用户大量使用).

  3. BIRT:报告领域指南是一本好书.我不时使用它.

From watching the 2-part YouTube videos and perusing the BIRT manual, my understanding of it is the the worflow goes something like this:

  • Create a new Report in Eclipse
  • Use the BIRT Report Designer (Eclipse plug-in) to design a report
  • Populate the report with Data Sources (JDBC drivers & databases) and Data Sets (specific tables)
  • Generate/export/print the report

As cool as this tool seems to be, I cannot find any documentation that leads me to believe that this is a Java tool and not an Eclipse-only tool (meaning, it has a Java API and can interact with Java apps, as opposed to a pure Eclipe plug-in which requires manual/human interaction from the Eclipse IDE.

Specifically, I want to confirm that BIRT either can or cannot do the following:

  • Configure a report (layout, UI widget placement, data sources/sets, etc.) programmatically; i.e. in the same way that JasperReport API has the iReport designer that generates JRXML, is the same true for BIRT?
  • Kick off a report "generation" through a Java API whereby data gets read-in realtime and populates the report and the report can be sent out or stored on a file system
  • Create HTML and PDF versions of the same report

解决方案

Answers to your questions:

  1. Yes. BIRT may not be as powerful as JasperReports, but it can achieve most of the common needs. BIRT designer generates a .rptdesign file similar to JRXML in JasperReports.

    About your question: almost everything is possible to achieve programmatically in BIRT. BIRT Report Engine APIs is the best source for you to get started with all the functionalities you have mentioned. It has good examples given for every functionality.

  2. Not sure. BIRT usually fetches pre-saved data from DB and generates the report. You could though see the real time data representation (in the form of a flash chart may be) with the help of some external libraries (See if this thread and this example helps). But I am not aware of a direct way of converting the real time data to PDF/HTML report. You will have to find some hack(s).

  3. Yes of course. Refer the APIs. To be specific, irendertask.

Sources to get more information/answers:

  1. There are several example reports given on the website. A quick glance through them might give you more insights.

  2. For discussions and troubleshooting, refer eclipse community forum and BIRTExchange (heavily used by BIRT users).

  3. BIRT: A Field Guide to Reporting is an excellent book. I've used it myself from time to time.

这篇关于配置和动态生成BIRT报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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