1.What is JasperReports:
JasperReports is a powerful open source reporting tool that has the ability to deliver rich content onto the screen, to the printer or into HTML, XLS, PDF, CSV and XML files. It is entirely written in Java and can be used in a variety of Java enabled applications to generate dynamic content.
Its main purpose is to help creating page oriented, ready to print documents in a simple and flexible manner.
JasperReports organizes data retrieved from a relational database through JDBC according to the report design defined in an XML file. In order to fill a report with data, the report design must be compiled first.
The compilation of the XML file representing the report design is performed by the compileReport() method exposed by the dori.jasper.engine.JasperManager class.
Through compilation, the report design is loaded into a report design object that is then serialized and stored on disk (dori.jasper.engine.JasperReport). This serialized object is then used when the application wants to fill the specified report design with data. In fact, the compilation of a report design implies the compilation of all Java expressions defined in the XML file representing the report design. Various verifications are made at compilation time, to check the report design consistency. The result is a ready to fill report design that will be then used to generate documents on different sets of data.
In order to fill a report design, one can use the fillReportXXX() methods exposed by the dori.jasper.engine.JasperManager class. Those methods receive as a parameter the report design object, or a file representing the specified report design object, in a serialized form, and also a JDBC connection to the database from where to retrieve the data to fill the report.
The result is an object that represents the ready to print document (dori.jasper.engine.JasperPrint) and can be stored onto the disk, in a serialized form, for later use, or can be delivered to the printer, to the screen or can be transformed into a HTML, XLS, PDF, CSV or XML document.
JasperReports’ reports are defined in XML files, which by convention have an extension of jrxml. A typical jrxml file contains the following elements:
• jasperReport – the root element.
• title – its contents are printed only once at the beginning of the report
• pageHeader – its contents are printed at the beginning of every page in the report.
• detail – contains the body of the report.
• pageFooter – its contents are printed at the bottom of every page in the report.
• band – defines a report section, all of the above elements contain a band element as its only child element.
All of the elements are optional, except for the root jasperReport element.
2.Jasper available Plugins:
JasperAssistant is a visual report designer for JasperReports, a popular open-source reporting engine. It is built on top of the Eclipse’s plug-in architecture and its main goal is to help you create JasperReports report definition files through an intuitive graphical interface.
Benefits
• Design and layout your reports using an intuitive visual interface and avoid the need for XML editing of JasperReports templates.
• Take advantage of Eclipse IDE integration and effectively combine Java and JasperReports development.
• Efficiently locate and correct report problems using precise error indications.
• Preview your reports instantly using live data from a JDBC database connection, an XML document, JavaBeans array or a custom data source.
• Export and preview your reports in PDF, Excel, HTML, CSV and XML formats.