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

Connection to Amazon Neptune endpoint from EKS during development

This small article will describe how to connect to Amazon Neptune database endpoint from your PC during development. Amazon Neptune is a fully managed graph database service from Amazon. Due to security reasons direct connections to Neptune are not allowed, so it's impossible to attach a public IP address or load balancer to that service. Instead access is restricted to the same VPC where Neptune is set up, so applications should be deployed in the same VPC to be able to access the database. That's a great idea for Production however it makes it very difficult to develop, debug and test applications locally. The instructions below will help you to create a tunnel towards Neptune endpoint considering you use Amazon EKS - a managed Kubernetes service from Amazon. As a side note, if you don't use EKS, the same idea of creating a tunnel can be implemented using a Bastion server . In Kubernetes we'll create a dedicated proxying pod. Prerequisites. Setting up a tunnel. ...

Notes on upgrade to JSF 2.1, Servlet 3.0, Spring 4.0, RichFaces 4.3

This article is devoted to an upgrade of a common JSF Spring application. Time flies and there is already Java EE 7 platform out and widely used. It's sometimes said that Spring framework has become legacy with appearance of Java EE 6. But it's out of scope of this post. Here I'm going to provide notes about the minimal changes that I found required for the upgrade of the application from JSF 1.2 to 2.1, from JSTL 1.1.2 to 1.2, from Servlet 2.4 to 3.0, from Spring 3.1.3 to 4.0.5, from RichFaces 3.3.3 to 4.3.7. It must be mentioned that the latest final RichFaces release 4.3.7 depends on JSF 2.1, JSTL 1.2 and Servlet 3.0.1 that dictated those versions. This post should not be considered as comprehensive but rather showing how I did the upgrade. See the links for more details. Jetty & Tomcat. JSTL. JSF & Facelets. Servlet. Spring framework. RichFaces. Jetty & Tomcat First, I upgraded the application to run with the latest servlet container versio...

Managing Content Security Policy (CSP) in IBM MAS Manage

This article explores a new system property introduced in IBM MAS 8.11.0 and Manage 8.7.0+ that enhances security but can inadvertently break Google Maps functionality within Manage. We'll delve into the root cause, provide a step-by-step solution, and offer best practices for managing Content Security Policy (CSP) effectively. Understanding the issue IBM MAS 8.11.0 and Manage 8.7.0 introduced the mxe.sec.header.Content_Security_Policy   property, implementing CSP to safeguard against injection attacks. While beneficial, its default configuration restricts external resources, causing Google Maps and fonts to malfunction. CSP dictates which domains can serve various content types (scripts, images, fonts) to a web page. The default value in this property blocks Google-related domains by default. Original value font-src 'self' data: https://1.www.s81c.com *.walkme.com; script-src 'self' 'unsafe-inline' 'unsafe-eval' ...