Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Tham khảo tài liệu 'jasperreports 3.5 for java developers- p2', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Chapter 3 There are six overloaded versions of the fillReportToFile method which are listed below 1. JasperFillManager.fillReportToFile JasperReport jasperReport String destFileName Map parameters Connection connection 2. JasperFillManager.fillReportToFile JasperReport jasperReport String destFileName Map parameters JRDataSource dataSource 3. JasperFillManager.fillReportToFile String sourceFileName Map parameters Connection connection 4. JasperFillManager.fillReportToFile String sourceFileName Map parameters JRDataSource dataSource 5. JasperFillManager.fillReportToFile String sourceFileName String destFileName Map parameters JRDataSource dataSource 6. JasperFillManager.fillReportToFile String sourceFileName String destFileName Map parameters JRDataSource datasource The following table illustrates the parameters used in these methods Parameter Description JasperReport jasperReport String destFileName Map parameters This is used as the report template. Instances of net. sf.jasperreports.engine.JasperReport are in-memory representations of compiled report templates. This is used to define the name of the destination file in which to save the report. This is an instance of a class implementing the java.util. Map interface. It is used to initialize all the report parameters defined in the report template. Connection connection This is used to connect to a database in order to execute an SQL query defined in the report template. JRDataSource dataSource This is an instance of a class implementing the net. sf.jasperreports.engine.JRDataSource interface. As can be seen above in most cases we pass data for filling reports using an instance of a class implementing the net .sf.jasperreports . engine . JRDataSource interface. The report templates can have embedded SQL queries. These SQL queries are defined inside the queryString element in the JRXML file. For reports that contain an SQL query instead of passing a JRDataSource we pass an instance of a class implementing the j .