Generating the report
In JasperReports lingo, the process of generating a report from a report template or jasper file is known as filling the report. Reports are filled programmatically by calling the fillReportToFile()
method in the net.sf.jasperreports.engine.JasperFillManager
class. The fillReportToFile()
method fills a report and saves it to disk.
There are six overloaded versions of the fillReportToFile()
method, which are listed below:
JasperFillManager.fillReportToFile(
JasperReport
jasperReport,
String
destFileName,
Map
parameters,
Connection
connection
)
JasperFillManager.fillReportToFile(
JasperReport
jasperReport,
String
destFileName,
Map
parameters,
JRDataSource
dataSource
)
JasperFillManager.fillReportToFile(
String
sourceFileName ...
Get JasperReports 3.5 for Java Developers now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.