What is Report?
A report is meaningful and well summarized information of data from the database.
What is Jasper Report?
Jasper Reports is an open source reporting library which is available for windows and linux platforms. The Jasper report support many output formats like Excel, CVS, XML, PDF, HTML , RTF, Text etc..
It also supports many data sources like JDBC, Hibernate, EJB, Java Bean etc.,
The Jasper Report can be used on the web and also it can be used from simple Java application. It supports the presentation formats like Dashboards, tables, cross tabs, and charts. Basically open and standards based Java and Xml. Supported by the most active community of report designers and developers.
The Jasper report simplifies the solution by providing support for multiple data sources, sub reports and cross tab reports. The built in visualization capability of Jasper enables efficiently rendering large reports with limited available disk storage resources.
What is iReport?
iReport is a program that helps users and developers that use the Jasper Reports library to visually design reports. iReport is an Open Source program that can create complex reports which can use every kind of java application through Jasper Reports library.
We can use iReport in two different ways
a. Standalone installation
b. Using Plugins
Report Life Cycle
• Jrxml file contain the report structure information.
• Jrxml file is converted into Jasper Design object by JRXmlLoader.
• Jasper Compile Manager parses the jrxml file and compiles it to JasperReport file. This file does not contain any data.
• JasperFillManager fills the data which is passed from various data sources.
• Using JRXlsExporter the excel file is generated.
Features of Jasper Report
In addition to textual data, Jasper Reports is capable of generating professional reports including images, charts, and graphs. Some of the major Jasper Reports features include:
It has flexible report layout.
It is capable of presenting data textually or graphically.
It allows developers to supply data in multiple ways.
It can accept data from multiple data sources.
It can generate watermarks.
It can generate sub reports.
It is capable of exporting reports to a variety of formats.
Multiple Ways to Supply Data
Jasper Reports allows developers to pass data to a report by passing it report parameters. Report parameters can be instances of any Java class.
Data can also be passed to a report by using special classes called data sources. Report parameters and data sources can be combined for maximum flexibility.
Multiple Data Sources
Jasper Reports can generate reports using any relational database system supported by JDBC. However, it is not limited to database reports only. It can generate reports from a number of data sources, including XML files, Plain Old Java Objects (POJOs), any class implementing the java.util.Map interface, and any class implementing the javax.swing.TableModel interface.
Jasper Reports also supports empty data sources, which are used for simple reports that have no dynamic data displayed. If we need to create a report from a data source, not directly supported by Jasper Reports, it allows us to create our own custom data sources.
Watermarks
Jasper Reports is capable of generating background images or text on the reports it generates. These background images can serve as a sort of 'watermark' for the report. A watermark is like a secondary image that is laid over the primary image.
Watermarks can be used for branding reports and for security purposes, since they make it difficult to forge reports. All report pages have the same watermark, which gives them a consistent look and feel.
Subreports
Another feature of Jasper Reports is that it allows us to create sub reports, or reports within reports. Subreports simplify report design significantly by allowing us to extract complex report sections into a separate report, and incorporating that separate report into a master report.
Exporting Capabilities
Reports generated with JasperReports can be exported to a number of formats, including PDF (Portable Document Format), XLS (Excel), RTF (Rich Text Format, a format readable and editable by most word processors, including, but certainly not limited to, Microsoft Word, OpenOffice.org Writer, StarOffice Writer, and WordPerfect), HTML (HyperText Markup Language), XML (Extensible Markup Language), CSV (Comma-separated Values), and plain text.
2 Comments
Good start, but please write more on this topic
ReplyDeleteCan you explain how we create Jasper Report
ReplyDelete