2 of 18
In order to fill a report-design, one can use the fillReportXXX() methods exposed by thenet.sf.jasperreports.engine.JasperManager class. Those methods receive as a parameter thereport-design object, or a file representing the specified report-design object, in a serializedform, and also a JDBC connection to the database from which to retrieve the data to fill thereport with. The result is an object that represents a ready-to-print document(net.sf.jasperreports.engine.JasperPrint) and that can be stored on disk in a serialized form(for later use), can be delivered to the printer or to the screen, or can be transformed into aPDF, HTML, XLS, CSV or XML document.Contents Next >>
JasperReports Tutorial - API Overview
Main classes to use when working with JasperReports
These classes represent a façade to the JasperReports engine. They have various staticmethods that simplify the access to the API functionality and can be used to compile an XMLreport design, to fill a report, to print it, or to export to PDF, HTML and XML files.
This can be used to view the generated reports.
This can be used to view the report design.
JasperReports Tutorial - Report Designs
As mentioned, a report design represents a template that will be used by the JasperReportsengine to deliver dynamic content to the printer, to the screen or to the Web. Data stored inthe database is organized according to the report design to obtain ready to print, page orienteddocuments.The report designs are defined in XML files and must have a special structure. This structureis declared in a DTD file supplied with the JasperReports engine. The XML files are thencompiled, in order to use them in report filling operations.To create a simple report design, we have to edit an XML file with the following structure:
<?xml version="1.0"?><!DOCTYPE jasperReportPUBLIC "-//JasperReports//DTD Report Design//EN""http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"> <jasperReport name="name_of_the_report" ... >...</jasperReport>