Step by Step Instructions on How to Setup iReport Designer and Design a Report
Oguzhan Topsakal
March 2006
Downloading iReport Designer 1.2.0 for Jasper Reports
Download iReport Designer 1.2.0 for Jasper Reports Tool from http://sourceforge.net/projects/ireport
Extract the compressed iReport-1.2.0.zip file in a directory (i.e in C:\Courses\CIS4301\ReportGenerator directory).
You should have the following directories in your C:\Courses\CIS4301\ReportGenerator\iReport-1.2.0 directory.
\bin, \docs, \fonts, \lib, \plugins, \templates
You can now run iReport Designer by clicking iReport.bat file in your C:\Courses\CIS4301\ReportGenerator\iReport-1.2.0 directory.
Setting up A Database Connection for iReport Designer 1.2.0
Run iReport by clicking iReport.bat file in your C:\Courses\CIS4301\ReportGenerator\iReport-1.2.0 directory.
Set up your database connection through menu item "Datasource" and then "Connections/Data sources".
Define a new data source by clicking new button. Enter the following properties for your database connection:
Name: any name you like for instance OracleCISE.
Type of Connection: Select Database JDBC connection from the drop down list.
JDBC Driver: oracle.jdbc.driver.OracleDriver
JDBC URL: jdbc:oracle:thin:@oracle1.cise.ufl.edu:1521:orcl
Username: your cise oracle username
You do not need to enter any other connection properties. Your password will be asked when you try to connect to the database to run your report.
This connection configuration is saved in your C:\Documents and Settings\WindowsUserName\.ireport\config.xml file.

Defining the Classpath for Oracle JDBC library
Place Oracle Database connection library (classes12.jar) into your lib directory. (For example place it in C:\Courses\CIS4301\ReportGenerator\iReport-1.2.0\lib directory.)
To get Oracle JDBC library (classes12.jar) connect to a CISE machine and find it under /usr/local/libexec/oracle-client/jdbc/lib directory.
Open the Classpath window by clicking "Tools" and then "Classpath" menu.
Click on the "Add JAR/Folder" button and define the path of classes12.jar.
Save Classpath by clicking "Save classpath" button.
You can now start designing your reports to present the data in your database.
Designing a Report
When you run iReport, you should see a window like the following:

To create a new report click on "New Document" in the File menu.
Name your report as the following: YourUFID_ReportNo (YourUFID is the UF ID of a group member).
You now can see a screen like the following:

In the library window, on the right hand side, you see a list of items: Fields, Variables, Parameters, Page Number, etc.
Fields are the database column names from where your report will retrieve data. To define the database fields, you need to define the Report Query.
Define your Report Query by selecting report query menu item in the Datasource Menu.
Write down your SQL SELECT statement. (As you write your query, you will be prompt for your password.)
After writing my query "SELECT * FROM members", I get the following screen:

You will see the list of columns from your query under the fields list in the library window on the left hand side of the iReport designer.
Drag and drop database fields from the field list onto Detail section of your report.
Put static fields (Static Text Field) onto ColumnHeader section of your report to define the data you are presenting. Select descriptive titles for your data.
Put a descriptive title for your report in the Title section.
Resize the Detail, Header and Footer sections if needed.
Your report design may look like this:

Save your report.

Run your report by clicking on
or by clicking on
the Execute Report (using active connection) in the Build menu.

For further documents and tutorials: http://jasperreports.sourceforge.net/documentation.html
Prepared by Oguzhan Topsakal
March, 2006