samaxes

samaxes logo

Ramblings about Open Source, Java and other Web technologies by Samuel Santos

BIRT/Stripes example

A long time has passed since my previous BIRT examples Deploying BIRT Report Engine API with Jakarta Struts and Deploying BIRT Report Engine API with Stripes.
Although they have received a lot of attention and downloads, the examples were really basic and are now outdated.

Since I had to use BIRT in my last projects I decided to update my BIRT/Stripes example.
This example doesn’t depend on the Tribix project anymore since BIRT supports HTML/Paginated HTML, PDF, Excel, Word, PowerPoint, and PostScript outputs (images/charts are not embedded in Excel output).

BIRT WebReport Example

I’ve tried to follow some good practices that I think are important to use in a production application:

  • There is a significant cost associated with creating an engine instance, due primarily to the cost of loading extensions. Therefore, each application should create just one ReportEngine instance and use it to run multiple reports. In this example the engine is started in the context listener and the same instance is always used.
  • All texts in the report should be loaded from the resources so the application can be fully localizable and fully internationalized.
  • You should use a JDBC data set to preview your report with BIRT designer but you must swap the data set in runtime to use data from your business logic.
  • You should use predefined styles instead of custom styles as much as you can.
  • Not a good practice but often a requirement, hide the master page when generating a HTML report, and change the visibility of elements so they are visible only to specified outputs.

For this example BIRT Runtime Engine 2.2.2 2.3.1, and Stripes Framework 1.5 were used.
Read the rest of this entry »

Deploying BIRT Report Engine API with Stripes

Now that I use preferably Stripes over Struts Framework, I’ve decided to port my example “Deploying BIRT Report Engine API with Jakarta Struts” to this Framework.

BIRT WebReport Example

For this example I’ve used Stripes 1.4.2, BIRT Runtime 2.1.2, and Tribix 2.1.2.
Read the rest of this entry »

BIRT and PHP Reporting

Actuate Corporation and Zend Technologies have teamed up to allow PHP developers to quickly add reporting capabilities to web applications using Actuate BIRT.

The collaboration between Zend and Actuate has resulted in new capabilities in the 3.0 version of the Zend Platform. Zend Platform 3.0 allows PHP developers to quickly integrate reporting capabilities, including charting, to web applications by calling Actuate BIRT reports via the Zend Java Bridge. Web application developers are often faced with strong end-user demands for reports that integrate and summarize application data. This new functionality will provide an efficient alternative to hand coding reports from scratch using PHP, and will ensure that more PHP applications are up and running quickly with the reporting capabilities that they need. Developers who have built reports using Actuate BIRT will now be able to easily distribute those reports via PHP applications.
Functionality that is now available to PHP developers includes:

  • Flexible report output formats that deliver single or multi-page PDF or HTML reports in several viewing and printed formats using parameters, multiple sections, grouping levels, charts, and more. Report content can also easily be exported to CSV format.
  • Reports built on top of any data source that enable report developers to access and generate reports from SQL databases, text files, or XML.
  • Easy-to-use visual design environment that enables developers to create and deploy reports in minutes via a simple, robust, wizard-driven interface.
  • Powerful integrated charting that enables charting reports to be built easily in a variety of types which include Line, Bar, Pie, Meters, Area, Scatter and Stock. The charts can be output in different formats including Scalable Vector Graphics (SVG).

Deploying BIRT Report Engine API with Jakarta Struts

After reading the great article Deploying BIRT from Jason Weathersby I decide to create a little example on how to use BIRT RE API with Jakarta Struts framework.

To do so I’ve followed Jason steps:

  1. Create a WebReport/WEB-INF/lib directory underneath the Tomcat webapps directory.
  2. Copy all the jars in the birt-runtime-2_1_0/ReportEngine/lib directory from the Report Engine download into your WebReport/WEB-INF/lib directory.
  3. Next, create a directory named platform in your WEB-INF folder.
  4. Copy the birt-runtime-2_1_0/Report Engine/plugins and birt-runtime-2_1_0/ReportEngine/configuration directories to the platform directory you just created. In this example the context is WebReport, so the folder structure is /webapps/WebReport/platform/plugins and webapps/WebReport/platform/configuration.
  5. Additionally, create directories below WebReport for image location and report location.

and used the same directory structure:

WebReport directory structure

The example allows you to generate reports in HTML, PDF, and XLS formats. For the last one I’ve used Tribix XLS Emitter.

To get more information about how to use XLS emitter with BIRT Report Engine API please read the README file that comes with in the binary distribution.

Read the rest of this entry »

Tribix - Extended Emitters for BIRT

Tribix 2.1.0 final - Extended emitters for BIRT (Business Intelligence and Reporting Tools) provides a set of extended emitters for BIRT 2.1.0 final or above.

It comes along with a PPT (MS PowerPoint) emitter preview release. You can now export all your reports made with the BIRT Reporting System to Excel, or even preview them in PowerPoint.

This version does support fixed-column-width sheet output and image export to Excel which are great news since my last post about Reporting Tools.

Here’s a screenshoot:
Tribix - Screenshot Preview as XLS

XLS(MS Excel) Emitter for BIRT

BIRTFor those who wanted an xls emitter for a long time, finally here may be a chance to taste. Thanks the Apache POI project and the new layout engine of BIRT 2.0, now we can easily create an xls emitter though it looks obviously not that fancy yet.

You can see the full article here.

Sponsors