Configuring & Generating BIRT Reports Dynamically

IAmYourFaja picture IAmYourFaja · Jul 7, 2012 · Viewed 28.5k times · Source

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

Answer

Pale Blue Dot picture Pale Blue Dot · Jul 12, 2012

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.