FCI-Helwan blog

Just another FCI-H weblog

Java Reporting: JasperReports

One of the purposes of software industry is to automate the routinely activities and summarize the data in decision supporting format which is commonly known by reports, that’s the reason why customers used to consider software as the wizard stick that will turn their usual mess into charming charts, graphs and visualized datagram’s. On the other side, reports are considered as the developers’ usual nightmare; you can obviously notice the misery look over the victim’s face when get assigned to the reports module.

When comes to reports, customers like to change their mind rapidly “Please, can we add new search criteria !!?”, “Oh, That result need a little bit change to fit what we dreamt with”, “If only we can group the results by clients country” and “Dear, the graph colors hurt users eye”.

We can summarize the usual troubles in report development in the following points:

  • Core changes: it’s usual to modify/add report core logic to reflect business changes or usability enhancements.
  • Results exporting: There is a wide set of formats to export your report to, such as: HTML, text, PDF, MS Excel, RTF, ODT, Comma-separated values, XML or image.
  • Complicated reports sub-reports and cross-tabs reports are good example.
  • Charts reports: visual chart e.g. Graph, Pie, 3D Pie, Bar, XY Line, Scatter, Meter and Time series.

A lot of frameworks, tools, libraries, and 3rd parties applications were introduced to facilitate the reporting process and to remove the overhead of the mentioned points, our topic today is about one of them .. JasperReport.
JasperReport is a well-known open source java reporting engine that gained wide popularity in few years. Unlike other tools –e.g. Crystal Reports- it’s based on java and doesn’t have its own expression syntax.

Let’s read what’s written in wikipedia about JasperReports features:

  • PDF, HTML, Microsoft Excel, RTF, ODT, CSV and XML files. The engine allows report definitions to include charts, with the rendering provided by the JFreeChart library which supports many chart layouts, such as Pie, Bar, Stacked Bar, Line, Area, Scatter Plot, Bubble, and Time series.
  • Multiple sources can be merged together. The data can be retrieved from defined data sources such as JDBC, CALS Table Models, JavaBeans, EJBQL, XML, Hibernate, and Comma-separated values, and additional data sources can be added to the JasperReports framework by plugging in a custom JRQueryExecuter. An extension is available to use Oracle PL/SQL stored procedures as a data source.
  • Scriptlets may accompany the report definition, which the report definition can invoke at any point to perform additional processing. The scriptlet is built using Java, and has many hooks that can be invoked before or after stages of the report generation, such as Report, Page, Column or Group.
  • Sub-reports.

As a victim developer I’ve passed through the report development iterations by its whole faces (designing, implementing, changing, changing, changing and more changing), but I was little more lucky to work with Jasper through this long cycle in sub-reports, Crosstabs, Charts and graphs.

The main difficulty I faced while working with jasper was the shortage of resources and tutorials, which is a common problem among other developers so I hope to transfer my personal experience with JasperReports in more detailed articles.

Continue to the next posts: 2, 3, 4

References:

http://www.jasperforge.org/jaspersoft/opensource/business_intelligence/jasperreports/index.html
http://en.wikipedia.org/wiki/Jaspersoft
http://www.javaworld.com/javaworld/jw-09-2002/jw-0920-opensourceprofile.html

Advertisements

June 5, 2008 - Posted by | JAVA

6 Comments »

  1. Hi
    This is a really good series (part 1&2 of reporting) – would you be interested in reposting this to JavaLobby? If so, contact me on james at dzone dot com and we can arrange it.

    Regards
    James

    Comment by James | June 9, 2008 | Reply

  2. The first wow gold thing for wow gold you to consider buy wow gold about the buy wow gold Druid class cheap wow gold is this: Is the cheap wow gold Druid class wow power leveling right for wow power leveling you? The power leveling Druid class power leveling is kind of wow gold unique in that buy wow gold it’s not for cheap wow gold everyone. While world of warcraft gold master of none.

    Comment by wow gold | February 16, 2009 | Reply

  3. Looking wow gold for thrilling weapons, wow gold items and new pets? Beating wow gold the more powerful and wow gold 5000 crueler giants? Becoming the cheers of your clanbuy wow gold 5000and impressing your friends? wow gold All in http://www.masswowgold.com, We are the wow gold best alliance of the online wow goldgame players! We have: 24×7 online wow gold support;50,000+ registered users;10,000+ Paypalcheap WOW goldreputations;4 years professional service provider;We get wow gold gold from the players cheap WOW gold who do not need them any more or wow gold 5000 collect them from the direct cheap WOW gold gold farmers with wow gold lower price. Now the sell wow gold WOW gold is under big promotion. sell wow gold Registered Member will get 10% bonus.wow gold 5000 Most of the orders can be completedv sell wow gold in 3 hours. And we will give our customers the extra 5% gold if wow gold 5000 we can not complete the order in cheap WOW gold 24 hours.We deliver cheap WOW gold the gold by sell wow gold face-to-face trade wow gold 5000 in game only. Full refund will be warranted if wow gold 5000 we can not complete the cheap WOW gold orders in cheap WOW gold time.

    Comment by Anonymous | March 24, 2009 | Reply

  4. Weekends to people ig2tmean that they can have a two-day wowgold4europe good rest. For example, people [url=http://www.gameusd.org]gameusd[/url]can go out to enjoy themselves or get meinwowgold together with relatives and friends to talk with each storeingame other or watch interesting video tapes with the speebie whole family.
    Everyone spends agamegold weekends in his ownmmofly way. Within two days, some people can relax themselves by listening to music, reading novels, or watching ogeworld films. Others perhaps are more active by playing basketball, wimming or mmorpgvip dancing. Different people have different gamesavor relaxations.
    I often spend weekends withoggsale my family or my friends. Sometimes my parents take me on a visit to their old friends. Sometimesgamersell I go to the library to study or borrow some books to mmovirtex gain much knowledge. I also go to see various exhibition to broaden rpg trader my vision. An excursion to seashore or mountain resorts is my favorite way of spending weekends. Weekends are always enjoyable for me.

    Comment by xxmy | April 19, 2009 | Reply


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: