In this review of JasperSoft’s JasperReports, I’ll explain all of the main features, benefits, and drawbacks of the free of charge – but not free of cost! – reporting engine.
JasperReports is an open source reporting engine that comes as a programming API for Java. It’s similar to the Windward Reports Engine, however, documentation costs money (have fun evaluating their software with no manuals to tell you how to use it). This is a fully functional product for free, so if you’re willing to spend a lot of time tinkering with it (because you don’t have more important things to do or anything), and if you are a developer who understands Java, SQL (or whatever query language your data source supports if you’re not using a relational database), and XML, then this is an enticing reporting solution. Why must you be a developer? Well, understanding Java is a requirement for using JasperReports in the first place, but in addition to that you will generally need to write an XML file as the report template, and within that XML file, you will have to use SQL to get your data and Java to manipulate it. Writing the XML files by hand is time consuming and highly error prone. You will definitely want to use JasperSoft’s report designer, iReport, to create the XML files, but it is open source and it comes from JasperSoft, so you run into the same problem of no useful documentation (unless you buy it).
Since we’re on the subject, let me say a bit more about iReport. It’s excellent for developing JasperReports templates, because then you don’t have to touch the XML. It also relieves you of most of the Java programming that you would have to do, but I found that I often had to use wrapper classes to make expressions work, and I had to use some of the Java API for special formatting. This means that you still have to understand how to use Java if you want to design JasperReports. Needless to say, ease of use for business users does not apply to JasperReports
No matter who you are, learning how to use iReport this is hard. Trust me, I scoured the Internet, looking for good resources for learning how to use iReport, but they’re all too basic and many are based on old versions. There is a scrap of documentation for iReport, but it’s archaic. Most of the
things you learn will probably be by way of guessing how a feature is supposed to work and then trying it out. If you have not already used a few report design programs, you have no chance of learning iReport without purchasing up to date documentation.
iReport does have a pretty good query builder for SQL. It lets you visually build your SELECT clause, and then you can choose to add any selected fields to the GROUP BY and ORDER BY clauses. There isn’t enough assistance in building your SQL query to call the query builder a wizard – you won’t be able to do it without a solid understanding of SQL – but it does at least parse the SQL and tell you if you have made a syntax error.
There is also a Java-expression builder, which like the query builder parses the expressions as you enter them. This expression builder aides you by allowing you to semi-visually construct your expressions. You can double click the name of fields and methods listed in the query builder to enter them into your code, and then fill in the missing arguments. Again, this can’t exactly be referred to as a wizard because it requires too much from you, but for very simple reports, you’ll probably only need to use the field names, which requires no extra Java. That’s enough about iReport, so let’s talk about the main features of JasperReports, starting with bands.
JasperSoft decided to go with what I like to call the band-style report layout. Report templates are divided up into meaningful sections called bands. Each band has a different effect on the data within it. For instance, the information in the page header band repeats once per page. The idea behind this type of report layout is that certain report elements go in certain places; charts go in the summary section, tables go in the details section, and so on. It does have the benefit of allowing you to leave out some information, for instance, you don’t have to mark fields as repeating, just put them in the details section. However, band-style inhibits your freedom to control the layout – whatever goes into that details section had better match the query, or else you’ll have to make a subreport
Bands work very well with groups. Grouping essentially causes the details section to split up all of your records into groups, and then, for each group wrap them into a header and footer. You can then do things like display the name of the group, do calculations by group, and nest groups within other groups. The group feature’s utility is diminished by the fact that you have
to set it up in your ORDER BY clause. This is especially irritating if you make a mistake in the ORDER BY clause, or if you choose that you want to change the order of your group nestings.
Want to make groups of products and hide the ones that haven’t been selling? You can set the “print when” expression of an element to cause it to print based on your data or a parameter (input values to the report). For instance, you can print a specific category of products based on the “Product Category” parameter, or you could bring up the most lucrative products based on the “Least Dollars Sold” parameter. Parameters can also be used to create linked subreports by including a parameter in the master report that will be used in the subreport’s query.
An even better way to quickly see what sells and what doesn’t is to use a chart or a cross-tab. With Jasper, you get a healthy selection of charts, including your basic pies, bars, and lines. Building both cross-tabs and charts is usually very simple. For charts, all you have to do is enter expressions to use for the data, which will usually be composed of a single field, and then configure the chart’s location and size. You can also attatch hyperlinks to charts or parts of the charts and use those to drill-through your report data. Cross-tabs are a little more complex because you have to set up variable fields and place them in the cells, but unless they are large cross-tabs, it shouldn’t take too long to do.
Compared to the competition, Jasper is only mediocre at best. It’s a simple fact that it is a powerful reporting engine capable of producing any sort of report you want, but it’s not even useable by most people, and it has no exceptional features or outstanding benefits. True, you can have a copy free of charge, but you’ll end up spending plenty of your precious time and money for documentation, training, and support