Saturday, March 31, 2012

BIRT vs JasperReports comparison

Recently I had the task to do the same report in BIRT and in JasperReports, to understand what are the limits of the report engines and to be able to make a choice between them, for future use of the one of them in a project.

I would like to mention that I never used any reporting engine before, so at the end of this task I made some conclusions that I would like to share with others, conclusions based on three weeks time of using these engines.





BIRT

JasperReports

Target

Built
with rich internet applications in mind (vs paper reports)

Pixel
perfect reports and web-based ones, but anyway for paper reports
mainly

Designer

Plug-in
for Eclipse. Preconfigured Eclipse for BIRT with the plug-in
available

Jasper
iReport Designer

Designer
performance

Faster
than JasperReports one

Slow,
especially when working with images. Designer freezes.

Designer
bugs/errors

Present,
but not as many as in the case of JasperReports. Designer
bugs/errors harder to correct in XML due to the fact that a lot of
XML generated (like in the case of a HTML page).

Present,
more than in the case of BIRT, but easier to correct in XML. (For
example changes in the UI that are not registered in the report,
or that at an instant of time does not affect the report). Closing
and opening the report solves the problem.

Designer
from the user perspective

User
friendly, and intuitive. If you know some web technologies or
markup languages it will be easier to understand how to use it.

Non-intuitive,
very complex. Lots of features that give you the opportunity to
control every part of the report, practically at any time of the
generation.

Tutorials
and support

Mainly
on the web, as videos or written ones. Community is always
growing.

Documentation
present, but does not always is sufficient. Lots of report
examples included in the distribution of the JasperReports engine,
but it might be difficult to understand how to achieve the same
results as in the examples, because one little property in the
designer can make a big difference on the output.

Reports
construction

One
single report in which you put all you want. Even there some
pretend that BIRT has the sub-report logic, I didn’t find it
so obvious as in the case of JasperReports

Master
report and sub-reports. Sub-reports can be created separately, and
included in the master report as references.

Adaptation
to screen size

HTML
based reports adapt themselves as HTML page adapt to the screen,
practically no difference

Limited
adaptation, basically scaling.

Report
generation process

Write
the report, and run it. That’s it.

Compilation
of the reports in Java-byte-code, after that these reports can be
filled with data, and in the end exported in the desired format.

Portrait
and landscape reports

Supported

Supported,
but not in the same report. If you need both landscape and
portrait pages in your report, you must create sub-reports and
merge them after with some third-party software.

Grouping
data

Supported,
but you cannot group already grouped data (In the case of nested
groups, like in JasperReports, or I didn’t find the solution
how to do this)

Supported,
and works very well. Nested groups allow you to create groups on
already grouped data. Limitation: data must be sorted already for
the grouping to work.

Scripting
and programming

JavaScript
and Java. Can be used at the same time. Debugging is a bit
difficult to configure. Does not always work, and you need to
delete the debug configuration and to recreate it to work again.

Java.
Debugging in Java, but limited, because in Java you mainly
compile, fill and export the reports.

Newspaper
layouts

Not
supported

Supported

Formatting
and styles

CSS
based, but not full CSS support. No inheritance present for
styles, so you cannot create styles that inherit. Obviously CSS
inheritance logic is applied (if a style is applied to a child,
then it overrides the style of the parent, even the parameters
that you didn’t specify for the child), but this in some
cases might lead to copy-paste code for styles.

Proprietary.
Allows you to change practically anything, and works well.

Positioning
of items inside the report

Supports
indents in practically any known units (mm, %, pixels etc.).
Absolute positionning works only for HTML output. You cannot
overlap items, the only way to do that is to use negavite margins,
but as the report is generated from top to bottom, from left to
right, this might not work.

Pixel-perfect,
indents and margins only in pixels.

Data
sources/ multiple data sources

Easy
integration of multiple data sources, as 1-2-3. Create data
source, create dataset and bind to it, and that’s it.

Nightmare.
If you need to use multiple data sources in your report, think
very well before choosing Jasper. Multiple data sources must be
passed from Java, and passed as parameters to sub-reports. Also,
even if your master report does not use any data source, or other
root sub-report, then you must specify at least JREmptyDataSource,
because otherwise the sub-reports will not be able to use the data
source at all. True for DB connections, XML data sources etc.
Each
sub-report will have its own data source connection
.

Shape
drawing

Not
supported. Just images

Yes.
There is a palette with predefined shapes like lines, circles etc.
Very useful. But obviously this works only for PDF output.

Export
formats

Many.
Exporting to PDF and HTML give different results for both report
engines, so if you want multiple export choices to be supported,
you must test every option. Exporting to other format types
results in a “WTF is this?” when you see the results.

PNG
support

YES

NO,
so no transparency

Xpath
support

YES, but not full xPath supported. For example “/root/volumes[id='1']” does not give any results. Birt Xml  driver
supports only attribute filters



YES, full.

Resources
integration, like images for instance

Yes,
easy.

Hard.
Dynamic images for example must be passed as parameters from Java
code.

Integration of other PDF files into the generated report

Not supported. Suggested tools: iText, and only after generation

Not supported. Suggested tools: iText, and only after generation.

Conclusion

User
friendly, easy to use, especially if you know some on web
technologies. Community is growing constantly and new features are
added. Sometimes the reports do not look like you want them to
look, even if theoretically they should. To design such reports
you must know some Java and JavaScript. Creation time is at least
1.5x faster than in the case of JasperReports. Even with all drawbacks, I would go with BIRT

Non-intuitive
and very complex designer, but allows a very fine control over the
process of generation of the report. PDF reports look exactly as
you designed them (In comparison with BIRT). No need to know any
programming language, reports can be created fully in the
designer. Creation time of the reports needs at least 1.5x more
time than in the case of BIRT (From my experience, not knowing any
of these engines)




If anyone has some suggestions, or I made a mistake somewhere, please contact me ;)
Hope this will be useful for someone!

P.S. This comparison was make in Q1 2012.

3 comments:

  1. I would go for Jasper Reports. Reports are mainly for paper. Jasper scores here to very big extent. You get excellent reports. Learning is not that difficult as everything is gui based. Inbuilt query tool, jasper server which can render report to different users, parameters, scheduling of reports, email notifications .... The list goes on. I would say Birt is for developer. Jasper is for end user.

    ReplyDelete
    Replies
    1. Yes, if to consider only paper reporting, Jasper is better. The only thing is, as I mentioned, that it will be more difficult and expensive(at the beginning) to learn the GUI and develop your reports. But after you invested the time and the money that Jasper requires, you will get what you want and how you want it, for sure! Actually, I create right now reports in Jasper for the same reasons you stated in your comment, because of the choice of the client, and Jasper does the job excellently!

      Delete
    2. I have done a similar comparison an used both for production systems on different projects. I've not seen much evidence of BIRT evolving too much over the last number of years. And the came can be said for Jasper. For project I was involved in, Jasper allowed much more flexibility and I found BIRT limited. I was able to plug my code base in to IReport as a source folder and was very useful for testing. IReport is quite easy to use and JFreeChart is quite easy to integrate with Jasper for producing nice reports. I didn't find the Birt Plug-in as user firendly and cumbersome to use. Doesn't help being tied to Eclipse only as well

      Delete

Note: Only a member of this blog may post a comment.