Jan 18, 2010

Java Reports - Comparitive Study

One of the important goals that applications must be designed for is to be able to convey complex data to the end-user in the simplest, attractive and most understandable form and ‘Reports and Charts’ go a long way in achieving this goal. Java and JEE applications being one of the leaders in the enterprise application space commonly require to display complex data in the form of Charts (such as Pie charts, bar charts etc), Documents (PDF, MS Excel etc) or Reports that are customized specifically for an application . There are a number of tools available to the Java developer that can be utilized to generate reports. This document covers some of the important aspects of the most commonly used, freely available and Open-Source Reporting tools used in the Java world.

The Contestants:

This article covers three of the commonly used Reporting tools in Java application viz. Jasper Reports , DataVision and BIRT(Business Intelligence and Reporting Tools). All three are a favorite among Java applications primarily because of the following 3 reasons –

  • Freely available.
  • Open Source.
  • Good documentation and option to avail commercial support.
Jasper Reports

JasperReports is a powerful open source Java reporting tool that has the ability to deliver rich content onto the screen, to the printer or into PDF, HTML, XLS, CSV and XML files. It is entirely written in Java and can be used in a variety of Java enabled applications, including J2EE or Web applications, to generate dynamic content. Its main purpose is to help creating page oriented, ready to print documents in a simple and flexible manner.

Features

  • Wide array of output formats
  • Flexible Data Sources : JasperReports can use any data source provider, allowing it to extend reporting capabilities to almost any third-party application. When it is not possible to access data through JDBC, or when you do not want JasperReports to interact directly with a database, you can implement a custom JasperReports Data Source. The jasper reports can fetch data from the following different data sources:
    • Database JDBC connection
    • XML file data source
    • JavaBeans set data source
    • Custom JRDataSource
    • File CSV data source
    • JRDataSourceProvider
    • Hibernate connection
    • Spring loaded Hibernate connection
    • EJBQL connection
    • Mondrian OLAP connection
    • Query Executor mode
    • Empty data source
    • Custom iReport connection
    • XMLA Server Connection
  • Internationalized and Localizable
  • Conditional printing
  • Visual text rotation
  • Integrated barcode support
  • Web-based and pixel-perfect reports

Output formats

  • PDF, HTML, XLS, CSV and XML files
  • Can create custom reports by designing the UI ourselves and feeding data to the report-design.

Completely developed in Java and compatible with any Java application

Positives

  • Has iReport as an accompanying GUI tool to design reports.
  • When it is not possible to access data through JDBC, or when you do not want JasperReports to interact directly with a database, you can implement a custom JasperReports Data Source. In addition, any report can use data from multiple data sources, which can even be of different types.
  • Widely used for reporting in Java applications.
  • Hibernate query support in addition to SQL queries

Negatives

  • Extra compilation of the report-design every time.
  • Huge learning curve.

Hibernate queries are powerful, but can lead to performance issues unless special care is paid to optimization

Datavision

DataVision is an Open Source reporting tool similar to Crystal Reports. Reports can be designed using a drag-and-drop GUI. They may be run, viewed, and printed from the application or exported as HTML, XML, PDF, Excel, LaTeX2e, DocBook, or tab- or comma-delimited text files. The output files produced by LaTeX2e and DocBook can in turn be used to produce PDF, text, HTML, PostScript, and more.

DataVision is written in Java and runs almost anywhere. It can generate reports from databases or text data files. Any database with an available JDBC driver should work: Oracle, PostgreSQL, MySQL, Informix, hsqldb, Microsoft Access, Progress, and more. Columns read from text files can be separated by any character.

Report descriptions are stored as XML files. This means you can not only use the DataVision GUI but you may also edit reports using your favorite text editor

Features

  • Drag-and-drop report builder.
  • Runs anywhere Java runs
  • Works with any database that has a JDBC driver: Oracle, PostgreSQL, MySQL, Informix, hsqldb, Microsoft Access, DB/2, and more
  • Formulas, using any language supported by the Bean Scripting Framework (BSF). The default formula language shipped with DataVision is Ruby (via JRuby).
  • Reports can read data from different data sources. Currently, data sources are defined for databases and text data files (comma-separated, tab-separated, etc.)
  • Print report from DataVision
  • GUI translated into eleven languages.
  • Open source, so you get all the code to play with and use.
  • DataVision is embeddable within your own application.

Output formats

  • HTML, XML, PDF, LaTeX2e, DocBook, or tab- or comma-delimited text files, Charts, etc

Positives

  • Drag and Drop GUI for designing the report. (Report design can be modified using text-editors too, since the design-information is stored as an XML.)
  • Unlike Jasper where the dxml(containing report design information) has to be compiled every time to a .jasper file before converting the report into the required output format.

Negatives

  • Internationalization and Localization of Reports is a problem.
BIRT (Business Intelligence and Reporting Tools)

BIRT is an Eclipse-based open source reporting system for web applications, especially those based on Java and J2EE. At a high level, BIRT provides a graphical report design environment, packaged either as a plug-in for the Eclipse IDE or as a standalone report designer, and a set of runtime APIs for integrating reports into your applications. BIRT has two main components: a report designer based on Eclipse, and a runtime component that you can add to your app server. BIRT also offers a charting engine that lets you add charts to your own application.

Features

Can add a rich variety of reports to your application such as:

  • Lists - The simplest reports are lists of data. As the lists get longer, you can add grouping to organize related data together (orders grouped by customer, products grouped by supplier). If your data is numeric, you can easily add totals, averages and other summaries.
  • Charts
  • Crosstabs - Crosstabs (also called a cross-tabulation or matrix) shows data in two dimensions: sales per quarter or hits per web page.
  • Letters & Documents - Notices, form letters, and other textual documents are easy to create with BIRT. Documents can include text, formatting, lists, charts and more.
  • Compound Reports - Many reports need to combine the above into a single document. For example, a customer statement may list the information for the customer, provide text about current promotions, and provide side-by-side lists of payments and charges. A financial report may include disclaimers, charts, tables all with extensive formatting that matches corporate color schemes.

Output Formats

Simple lists of data, Charts, Crosstabs, HTML, Paginated HTML, PDF, WORD, XLS, and PostScript etc.

Positives

  • Unlike Jasper where the dxml(containing report design information) has to be compiled every time to a .jasper file before converting the report into the required output format.
  • Feature to create BIRT separates data collection from layout which gives a couple advantages like multiple data sources.

BIRT supports reusability with templates (custom report starting points) and libraries (reusable report pieces). Customized Templates helps to tightly control report writing capabilities.

Comparison Chart

Features/Tool

Jasper

DataVision

BIRT

Owned by

JasperSoft

--

Eclipse Foundation

Open Source

Yes

Yes

Yes

Database connectivity

JDBC, XML, EJBQL connection, Hibernate connection.

Any database that has a JDBC driver

JDBC connected Database, flat files, XML, Scripted(Lets you write code to access other data sources.) etc.

Internationalization & Localization Support available

Yes

No

Yes (Language packs available)

UI Tool to design Reports

Yes (iReport)

Yes

Yes

Format of Reports

Charts and Documents(PDF, HTML, XLS, CSV and XML)

Charts and Documents(PDF, HTML, XLS, CSV and XML)

Charts and Documents(PDF, HTML, XLS, CSV and XML)

Support for Hibernate queries

Yes

No

Yes

 
Conclusion:

As we see from the features of these Reporting tools, there isn’t a particular tool among the three which is the best. Each of them can have their pros and cons and it is left to the user to choose his/her favorite reporting tool after thoroughly matching the requirements of the application to the features provided by the tool. But one can rest assured that these tools have been tested and have proved their mettle in this sector and are continually upgraded

6 comments:

Michele Mauro said...

A correction: in JasperReports, it is NOT necessary to compile the design every time, but only once; you can then cache or even save the compiled file.
One of my application ships with the compiled reports; another compiles at the first request and then caches the compiled definition.

Articles said...

Hi Michele,

Thanks for reading this article. You are correct when the jasper designs are static, if the design is dynamic, jasper compiler compiles every time.

please advice if i am wrong,

Anonymous said...

DataVis seems nice but also seems very dead. No mailing list traffic, last release over 1.5 years ago. :(

Ulises Chesini said...

I.ve been working with reports for years and without any doubt Jasper is the best tool.

dinesh parikh said...

Very good information!

Here is more:

Are you looking for better reporting software, have look at Windward Reports. With Windward you design reports in Microsoft Word, Excel, or PowerPoint so report design is a lot faster and easier - and non-programmers can design reports.
for more:reporting software

genesis said...

Thanks for the comparison chart in the end, heres another wonderful comparison with bombarding contestants: http://www.javareports.info/how-to-choose/list-of-java-reporting-software-alternatives/

Text Widget

Copyright © Vinay's Blog | Powered by Blogger

Design by | Blogger Theme by