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:
First, the comparison results of Java libraries (DynamicJasper and DynamicReports):
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:
Disadvantages:
Conclusion:
Keeping in mind my use cases, I'd definitely prefer to use dynamic Java based solution - DynamicReports.
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):
- Both libraries suffer from poor-quality or missing Java docs but they look a bit better in DynamicJasper.
- 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.
- 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.
- 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.
- 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).
- 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:
- 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.
- 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.
- It allows accessing specific reports by specific links so that corresponding link can be shown at some application page that provides the data.
- 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:
- 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).
- 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.
- 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).
- 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.
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/
ReplyDeletewhich talks about what factors to consider while picking the right java reporting tool. For readers who are interested you may look into this.
Thx for the positive feedback! :)
DeleteI 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...
ReplyDeleteHi Roger,
DeleteThx 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.