Skip to main content

Choosing Java reporting tool - part 2

I've provided a general overview of possible solutions to get a reporting/exporting functionality in the previous post. This is the second overview of alternatives based on JasperReports reporting engine.

Since the previous part I've done the following:
  • Implemented a simple report using both DynamicJasper and DynamicReports to compare them from technical side.
  • Investigated JasperServer features and tried to implement a simple report for JasperServer instance (it appeared we already have a ready licensed installation of JasperServer that makes it unreasonable to install a fresh one).

First, the comparison results of Java libraries (DynamicJasper and DynamicReports):
  1. Both libraries suffer from poor-quality or missing Java docs but they look a bit better in DynamicJasper.
  2. Taking into account the point 1, a developer has to use online documentation and to review the code. Here the code looks definitely nicer and more readable for DynamicReports. With respect to online documentation, both solutions provide quite extensive information although I like DynamicReports more once again (it always provide complete working code and resulting generated PDF; it's very well-structured and just pleasant to read). Probably this point is more than subjective.
  3. Unfortunately, I couldn't make working a percentage column in DynamicJasper; it led to an exception that was hard to resolve so I just gave up wasting time.
  4. The latest DynamicJasper uses JasperReports 3.5 (as specified in docs) but some features fail with this version. As a result, I had to switch to JasperReports 3.7 (despite it's unknown to be supported by DynamicJasper) to avoid getting exceptions. BTW, the latest JasperReports version is 4.1.2 that works flawlessly with the latest DynamicReports.
  5. It's a pity that DynamicJasper doesn't support maven. Some volunteers added old versions to an official maven repository but they are outdated (DynamicJasper maven artifacts). In comparison, DynamicReports supports maven and deploys its artifacts immediately (DynamicReports maven artifacts).
  6. DynamicReports shows much more active development process (a new version appears almost each month) despite it already supports most JasperReports features. In comparison, it takes up to half a year for DynamicJasper to release a new version (the last was announced on 23rd June 2011 although JasperReports 4.0.2 was released already on 18th April 2011 being not supported anyway).

Conclusion:
Although another comparison proposes DynamicJasper as a better alternative, in my opinion, DynamicReports looks much better at the moment. I'd definitely use DynamicReports.

Second, let me describe pros and cons for JasperServer in comparison with dynamic Java solutions above:

Advantages:
  1. It looks like a stable and widely-used software that allows to move reporting functionality to a separate server. It's a great solution if you need to schedule generating of reports and to save processing time at the application server side.
  2. It provides a role-based access to different levels of reporting. Thus, it can be configured in a flexible way. For example, specific users can only select some columns among the whole set of available ones and generate a report with those columns. It allows leaving this up to end user to do some basic control over reporting. It's a very nice opportunity if it's really needed.
  3. It allows accessing specific reports by specific links so that corresponding link can be shown at some application page that provides the data.
  4. Theoretically, it's possible to use any type of datasource (not only direct access to a database) although it'll definitely require to code the custom datasource.

Disadvantages:
  1. There are two ways to prepare jrxml file (it's a main file of Jasper Report): using the official iReport visual designer tool (there are similar paid alternatives) or coding the xml manually. Both ways are quite complex (and extremely complex to a newbie).
  2. The case is that our JasperServer installation is of old version (3.1.0). The iReport tool has a compatibility mode but it doesn't work completely as it refuses to save the report in old version format. Also it's hard to find any good documentation for old versions of iReport. As a result, I spent much time with different versions but I couldn't create a report that would work with our JasperServer instance.
  3. It's feasible to leave up to end user some manipulations with report. However, it seemed to me that the opportunities are quite limited. Users can select/deselect some columns to be shown in report and change order of columns. Probably they can do more in the latest JasperServer version (and I might have missed other features).
  4. This point is about the design aspect and related to my use cases. If I'm going to use JasperServer, I'll have to think of some custom datasources to be implemented for existing applications (that provide data to be exported in PDF or XLS). It'll require development both in application and for JasperServer. The specific datasources will depend on application logic anyway and there is always possibility that I'll have to change all parts if application changes. I'd greatly prefer to keep specific parts together and keep reporting functionality in an application in this case.

Conclusion:
Keeping in mind my use cases, I'd definitely prefer to use dynamic Java based solution - DynamicReports.

Comments

  1. i really enjoyed reading this blog esp, the pros and cons section! I have also gone through this site: http://www.javareports.info/how-to-choose/what-to-consider-when-selecting-a-java-reporting-software/

    which talks about what factors to consider while picking the right java reporting tool. For readers who are interested you may look into this.

    ReplyDelete
  2. I enjoyed reading this article. Seeing that currently we have JasperServer 4.7.1, where can I get some help in integrating our Jasper server with DynamicJasper. I must admit this is the first time I read about DynamicReports, so I'm glad there is an alternative. At this point I'm about at my kneck trying to get a dynamic java reporting tool to work with JasperServer. Can I get a guru to help me out here please...

    ReplyDelete
    Replies
    1. Hi Roger,

      Thx for the feedback! You should definitely check both tools websites:
      http://dynamicjasper.com/
      http://dynamicreports.sourceforge.net/

      On both sites you can find Documentation/Examples/How-Tos. There are also forums for both tools that you can find links to via menu item Support.

      Regarding your question about integrating JasperServer with a dynamic java reporting tool, it doesn't make sense to me as these are two separate approaches. For using a dynamic java reporting tool you don't need JasperServer at all and vice versa. Although you can use DynamicJasper to create jrxml file that you can add later to your JasperServer:
      http://dynamicjasper.com/2010/10/06/how-to-export-to-jrxml/

      For more questions about DynamicJasper please refer to its website documentation as I preferred an alternative tool - DynamicReports.

      Delete

Post a Comment

Popular posts from this blog

DynamicReports and Spring MVC integration

This is a tutorial on how to exploit DynamicReports reporting library in an existing Spring MVC based web application. It's a continuation to the previous post where DynamicReports has been chosen as the most appropriate solution to implement an export feature in a web application (for my specific use case). The complete code won't be provided here but only the essential code snippets together with usage remarks. Also I've widely used this tutorial that describes a similar problem for an alternative reporting library.
So let's turn to the implementation description and start with a short plan of this how-to:
Adding project dependencies.Implementing the Controller part of the MVC pattern.Modifying the View part of the MVC pattern.Modifying web.xml.Adding project dependencies
I used to apply Maven Project Builder throughout my Java applications, thus the dependencies will be provided in the Maven format.

Maven project pom.xml file:
net.sourceforge.dynamicreportsdynamicrepo…

Do It Yourself Java Profiling

This article is a free translation of the Russian one that is a transcript of the Russian video lecture done by Roman Elizarov at the Application Developer Days 2011 conference.
The lecturer talked about profiling of Java applications without any standalone tools. Instead, it's suggested to use internal JVM features (i.e. threaddumps, java agents, bytecode manipulation) to implement profiling quickly and efficiently. Moreover, it can be applied on Production environments with minimal overhead. This concept is called DIY or "Do It Yourself". Below the lecture's text and slides begin.
Today I'm giving a lecture "Do It Yourself Java Profiling". It's based on the real life experience that was gained during more than 10 years of developing high-loaded finance applications that work with huge amounts of data, millions currency rate changes per second and thousands of online users. As a result, we have to deal with profiling. Application profiling is an i…