Đ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- p3', 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 5 Built-in Parameter Description REPORT_VIRTUALIZER Sometimes reports are too large to be handled by the available memory. Setting this parameter to an instance of a class implementing net.sf.jasperreports. engine.JRVirtualizer will allow JasperReports to store temporary data in serialized form in order to reduce the amount of memory required to fill the report. Some of the built-in parameters might not make sense yet however they will make more sense as we discuss some more JasperReports features in future chapters. The primary use of the report_connection and report_data_source built-in parameters is for passing them to subreports which are discussed in detail in the next chapter. Report localization and report scriptlets will be covered in Chapter 8 Other JasperReports Features. Map datasources JasperReports allows us to use instances of any class implementing the java.util. Map interface as a datasource. We can use either an array or a collection of Map objects to generate a report. Each Map in the collection or array is a record that will be used to generate the data for each row in the detail area of the report. The JasperReports API provides an implementation of net.sf.jasperreports.engine.JRDataSource called net.sf.jasperreports.engine.data.JRMapArrayDataSource that we can use for using an array of Map objects as a datasource. The following example demonstrates this class in action package net.ensode.jasperbook import java.io.IOException import java.io.InputStream import java.io.PrintWriter import java.io.StringWriter import java.util.HashMap import java.util.Map 89 Working with Other Datasources import javax.servlet.ServletException import javax.servlet.ServletOutputStream import javax.servlet.http.HttpServlet import javax.servlet.http.HttpServletRequest import javax.servlet.http.HttpServletResponse import net.sf.jasperreports.engine.JRDataSource import net.sf.jasperreports.engine.JasperRunManager import .