IT is Fun

December 18, 2007

Java – iReport with active connection

Filed under: Blogroll, Java, Uncategorized — themamakcorner @ 3:10 am

I remember generating reports using Oracle Report Builder, and it was a tough one, especially dealing with the “sensitive” alignments.

Have always fear of doing reports… well, not till I notice there are open-source reporting tools offered in the market.

Been generating reports using iReport and JasperReport, and I would say, things are becoming easier, and faster when developing a system or application to generate reports.

Taken from the official site of iReport, it says that iReport is a powerful, intuitive and easy to use visual report builder/designer for JasperReports written in 100% pure java. This tool allows users to visually edit complex reports with charts, images, and subreports. iReport is integrated with leading open source chart libraries for java.

To start using iReport, you can always download for free at iReport site

After unzip, the folder, double click on the bat file and iReport is ready to run.

the iReport gui

Here, I’m going to show how to create a report using active connection. Assumption is you have a db installed on your local pc. For this, I have postgres installed in mine.

Before we get any further, after you have the iReport, you need to set the classpath.

options => classpath

a classpath box appeared

Add JAR => search for the jar file and add it

there i have configured my classpath

Now that you are done with the classpath, you can start creating connection by this:

Data => Connections/Data Sources

add new connection

To the next step, will be start creating report template.

File => Report wizards

Write a select SQL.

write sql

Click next, and add the fields columns to be displayed in your report.

select columns

Save it, and now you’re ready to run iReport with an active connection.

Build => Execute

There you have. Isn’t it simple?

2 Comments »

  1. hai ,

    I need the solution to solve that is given to input parameter option in ireports (like select box in html)

    And Then corresponding option parameter will asked the input parameter option in alert box in ireports 2.0.2.

    After any one finise this problem , immediatley ,send to my personal mail id in yahoo (drvengadesh_r@yahoo.com)

    So,Please keep it up .
    Byeeeee.

    Comment by Vengadesh — August 26, 2008 @ 10:46 am

  2. how to show ireport in jsp page???
    thanks…

    Comment by str_ardi_per — December 9, 2008 @ 8:10 am


RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.