Página 1 de 21
A Tutorial on Reporting in JAVA using JasperReports, iReport and JFreeChart
Onur Derin, oderin(a)softhome.net, Parsera Information Technologies This tutorial aims to get the reader acquianted with the three of the open source JAVA reporting tools, namely JasperReports[1], iReport[2] and JFreeChart[3]. A.What is a Report? B.How are JasperReports, iReport and JFreeChart related? JasperReports iReport JFreeChart C.Creating a Sample Report with JasperReports, iReport and JFreeChart Creating the XML File for JasperReports using iReport Creating the Final Report using JasperReports Creating Report Images using JFreeChart Pie Chart Bar Chart Hints Referrences Useful Links Appendix A Sample JasperReport XML File – sample.jrxml Appendix B Sample JasperReports JAVA File - sample.java
A. What is a Report?
A report is a nicely formatted way of presenting the data that you have entered. Reports are all about querying a database and displaying the results in a nice format. Data in the database may be displayed just as is, that is, in hundreds of pages. However, most of the time, reports are used to grasp information out of a bunch of data. This is mainly done by charts which are graphical representations of information. When the data is processed to fill out a report, calculations are done over the specific fields of the entries. The results appear as bars or pies in a chart or as text at the end of the report. Many of the commercially available reporting tools have the following layout for a report page.
http://members.lycos.co.uk/oderin/tutorials/JavaReporting/JavaReportingTutorial.htm?
03/01/2005
A Tutorial on JasperReports, iReport and JFreeChart
Página 2 de 21
Figure 1: General Report Template title appears only once at the very beginning of the report. Title of the report is written in this part. eg. “Employee Performance Report” pageHeader appears at the top of each page. This
Links: /* * Sample.java * * Created on July 19, 2004, 12:49 PM */ http://members.lycos.co.uk/oderin/tutorials/JavaReporting/JavaReportingTutorial.htm?