26 November 2009

Jasper Reports - Exploring Sample Reports

In the previous article, we set up Jasper Server Reports and were looking at the sample reports that come with the installation.

Here, we'll explore some of the base functionality of Jasper Reports.

Using as an example the Jasper Server Report, we can see that Jasper can do a number of things:

1) Multiple formats for the same report. We only have to write the report once, and the users can display them in a number of formats: PDF, Word, Excel, CSV, Flash and of course HTML:

Employeee list report, different formats available


2) Parametered sub-reports are available from a report. The Employee List report contains a link to the Employee Accounts report. The Employee Accounts report requires an employee as a parameter. To display the Employee Accounts report for Max Jensen, you can click on the view link.

Jasper Reports Employee Link to Accounts

The parameter is passed as part of the URL for this report:

http://localhost:8080/jasperserver/flow.html?reportUnit=%2Freports%2Fsamples%2FEmployeeAccounts&EmployeeID=max_id

which you can define in the Employee report itself. You can also see that this report is available from the top level list of reports:

Jasper Reports Report List

When you click here, you get a list of employees to choose from:

Employee selection

which brings us to the same report that we got when we clicked on the view button in the Employee List:

Employee Accounts report

For those reports which require parameters, there is an icon in the top left of the screen to change the parameters:

Select other parameters for the report

Next, we're going to cover iReport, and create and modify some reports. Next>>

24 November 2009

Jasper Reports - Getting Started

I've been exploring the functionality of Jasper Server Reports.

For this, I'm using Jasper Server reports & iReport version 3.5.0. This is available from SourceForge. There is a version for Windows (jasperserver-3.5.0-windows-installer.exe)
and Linux/Solaris/Mac (jasperserver-3.5.0-linux-installer.bin).

We're going to use the windows version.

Once you've downloaded the package, you need to execute it. If you're just evaluating the software, choose the defaults to use the Tomcat, MYSQL and iReport packaged with the executable. If you're evaluating, install the sample reports.

Once you've done that, with Jasper Server started, the web interface is available with http://localhost:8080/jasperserver/login.html.

There are two or three logins already there, jasperadmin/jasperadmin (the administrator) and joeuser/joeuser (an ordinary user).

Login as jasperadmin, and then, nn the tree, click on Reports to display the list of reports:

Jasper Server Reports List of reports

And clicking on one of the reports (Employee List) displays the report in the web page:


Jasper Server Reports Employee List Report

If this is displayed correctly, then Jasper Reports is installed correctly.

We're ready to start exploring the reports themselves Next>>