Java Reporting using Jasper for iSeries

Submitted by rizwan on Mon, 2005-12-26 11:10.

This article can be used for anyone wishing to use Java reporting using Jasper for iSeries with iReport but has specific focus for iSeries (AS400 developers).

Reporting on iSeries has come a long way. Traditionally, iSeries developers have to create reports using RLU, and then the RPG report program creates a spool file which the user then prints for his analysis. It's a normal sight to see users printing bulk print-outs from the spool file. Then the need came for sending the reports via email, and there are lot of tools now to convert spool files to PDFs to send the reports to others. Though these converted reports to PDF will suffice, they do not have a professional look; they may lack a company logo and there is no way to show different colors, charts, internationalization, bar codes, different fonts, etc.

Though you can buy a vendor product to do all those things, why not try Jasper Reports for free? With Jasper, you can achieve all these things and create a professional looking report with any formats you wish (PDF, Excel, rich text format, XML, and CSV). However, to use Jasper, you will have to use java, and integrate Jasper in your java programs. And moreover, you will have to write SQLs to generate the data for your report. Thus, it might not be the best idea to write a complex SQL to generate a report (for example, a purchase order report), in order to replace or imitate a legacy reporting RPG program. In that case, the conversion tools (converting spool to pdf) will be a better option.

So, consider using Jasper for any new reports or for any small-to-complicated reports where not more than 2 or 3 files are needed, or for any files with less data.

Enough talk, soon I will show you how to get started with Jasper and create reports. But before that, a small overview.

Posted in Submitted by rizwan on Mon, 2005-12-26 11:10.


Sammy (not verified) | Fri, 2008-05-16 16:53

Hi Rizwan, I am struggling to reverse an image or text in ireport. Can you please provide me some screen shots of how to do this. Also,I have a requirement to create barcode(code - 128) type. Can you please let me know if there is any link to do this in ireport. Thanks!

Bassem | Tue, 2006-10-31 14:10

Hello, I have a performance problem with a system as following: Environment: Our system uses Struts, Jasper, no EJBs Installed on WebSphere Application Server 6.0, on Windows Connected to Database on iSeries R5V3, through JDBC & JT400 drivers (latest one) HTTP Server is also on iSeries, redirecting the requests to the WAS on Windows Problem: When running the reports & the system functions, sometimes the same report for the same data is run many consequent times, and it takes the following different durations: 4, 53, 4, 4, 16, 5, 31, then 4 seconds. Not a constant repsponse time. In the WAS logs, we found the following: (First reference to the prepared report statment) [10/13/06 11:13:34:141 CEST] 00000029 SystemOut O Fri Oct 13 11:13:34:141 CEST 2006 as400: PreparedStatement STMT0006 (668837138) open. Parent: Connection APDEV (60040509) . (Preparing) [10/13/06 11:13:34:141 CEST] 00000029 SystemOut O Fri Oct 13 11:13:34:141 CEST 2006 as400: PreparedStatement STMT0006 (668837138) : Preparing ... (Immediately when calling executeQuery()): [10/13/06 11:13:34:516 CEST] 00000029 SystemOut O Fri Oct 13 11:13:34:516 CEST 2006 as400: PreparedStatement STMT0006 (668837138) : Descriptor 6 created or changed. (First releavent line of response after that which is 'Opening the result set'): [10/13/06 11:13:50:266 CEST] 00000029 SystemOut O Fri Oct 13 11:13:50:266 CEST 2006 as400: ResultSet CRSR0006 (1802577173) open. Parent: PreparedStatement STMT0006 (668837138). About 16 seconds are taken in executeQuery(), and it's the responsible for the major part of the delay & fluctuation. Any idea is much appreciated. Thanks,

Veronica (not verified) | Sat, 2012-06-23 19:55

I've been a graphic artist designer for about 5 years now. I'm just pretty unfamiliar with writing a blog and come across your website while looking for design blog sites. I've got to tell you just how stimulated I am with all your articles as well as the overall high quality of your blog. Lets hope I can build up a blog site like your site and will check out your blog posts with great focus. Thanks heaps for your motivation buddy.

Sundar (not verified) | Thu, 2006-04-27 09:35

Hai, I have a dought on the Reporting tools. The Jasper Reports and iReports both are same or different and what the did. In iReports the inputs are .xml or .jrxml files then they produce the corresponding report. My question is how can i create the .xml and .jrxml files from normal java files. Can u expalin with some sample codes. Please i was struggle with past 4 days with Jasper and iReport tools.

Anonymous (not verified) | Mon, 2007-03-12 18:26

Hi, IReport is the tool to generate .jrxml files in very simple manner. Without using IReport tool u can write .jrxml file by hand which is some what difficult. In reverse Ireport will show u the report when you give the .jrxml as input, but that is not purpose of Ireport tool. And come to jasperreport which is ur second question. when u load the .jrxml (design)file and compile it , then you will get the jasper report.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.