Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sf.jasperreports.engine
Class JasperFillManager

    java.lang.Object
      net.sf.jasperreports.engine.JasperFillManager

    public final class JasperFillManager

extends java.lang.Object

Fa�ade class for filling compiled report designs with data from report data sources, in order to produce page-oriented documents, ready-to-print.

All methods receive a Map object that should contain the values for the report parameters. These value are retrieved by the engine using the corresponding report parameter name as the key.

There are two types of method signatures with regards to the data source provided for filling the report:

- Methods that receive an instance of the `JRDataSource` interface and use it directly for retrieving report data;
- Methods that receive an instance of the `Connection` interface and retrieve the report data by executing the report internal SQL query through this JDBC connection and wrapping the returned `ResultSet` object inside a `JRResultSetDataSource` instance.

Version:
  $Id: JasperFillManager.java 3719 2010-04-09 12:04:52Z teodord $
Author:
  Teodor Danciu (teodord@users.sourceforge.net)
See Also:
  `JasperReport`, `JRDataSource`, `JRFiller`, `JasperPrint`

Method Summary
`static JasperPrint` | `fillReport(java.io.InputStream inputStream, java.util.Map parameters)` Fills the compiled report design loaded from the supplied input stream and returns the generated report object.
`static JasperPrint` | `fillReport(java.io.InputStream inputStream, java.util.Map parameters, java.sql.Connection connection)` Fills the compiled report design loaded from the supplied input stream and returns the generated report object.
`static JasperPrint` | `fillReport(java.io.InputStream inputStream, java.util.Map parameters, JRDataSource dataSource)` Fills the compiled report design loaded from the supplied input stream and returns the generated report object.
`static JasperPrint` | `fillReport(JasperReport jasperReport, java.util.Map parameters)` Fills the compiled report design supplied as the first parameter and returns the generated report object.
`static JasperPrint` | `fillReport(JasperReport jasperReport, java.util.Map parameters, java.sql.Connection connection)` Fills the compiled report design supplied as the first parameter and returns the generated report object.
`static JasperPrint` | `fillReport(JasperReport jasperReport, java.util.Map parameters, JRDataSource dataSource)` Fills the compiled report design supplied as the first parameter and returns the generated report object.
`static JasperPrint` | `fillReport(java.lang.String sourceFileName, java.util.Map params)` Fills the compiled report design loaded from the specified file and returns the generated report object.
`static JasperPrint` | `fillReport(java.lang.String sourceFileName, java.util.Map params, java.sql.Connection connection)` Fills the compiled report design loaded from the specified file and returns the generated report object.
`static JasperPrint` | `fillReport(java.lang.String sourceFileName, java.util.Map params, JRDataSource dataSource)` Fills the compiled report design loaded from the specified file and returns the generated report object.
`static void` | `fillReportToFile(JasperReport jasperReport, java.lang.String destFileName, java.util.Map parameters)` Fills the compiled report design received as the first parameter and places the result in the file specified by the second parameter.
`static void` | `fillReportToFile(JasperReport jasperReport, java.lang.String destFileName, java.util.Map parameters, java.sql.Connection connection)` Fills the compiled report design received as the first parameter and places the result in the file specified by the second parameter.
`static void` | `fillReportToFile(JasperReport jasperReport, java.lang.String destFileName, java.util.Map parameters, JRDataSource dataSource)` Fills the compiled report design received as the first parameter and places the result in the file specified by the second parameter.
`static java.lang.String` | `fillReportToFile(java.lang.String sourceFileName, java.util.Map params)` Fills the compiled report design loaded from the specified file.
`static java.lang.String` | `fillReportToFile(java.lang.String sourceFileName, java.util.Map params, java.sql.Connection connection)` Fills the compiled report design loaded from the specified file.
`static java.lang.String` | `fillReportToFile(java.lang.String sourceFileName, java.util.Map params, JRDataSource dataSource)` Fills the compiled report design loaded from the specified file.
`static void` | `fillReportToFile(java.lang.String sourceFileName, java.lang.String destFileName, java.util.Map params)` Fills the compiled report design loaded from the file received as the first parameter and places the result in the file specified by the second parameter.
`static void` | `fillReportToFile(java.lang.String sourceFileName, java.lang.String destFileName, java.util.Map params, java.sql.Connection connection)` Fills the compiled report design loaded from the file received as the first parameter and places the result in the file specified by the second parameter.
`static void` | `fillReportToFile(java.lang.String sourceFileName, java.lang.String destFileName, java.util.Map params, JRDataSource dataSource)` Fills the compiled report design loaded from the file received as the first parameter and places the result in the file specified by the second parameter.
`static void` | `fillReportToStream(java.io.InputStream inputStream, java.io.OutputStream outputStream, java.util.Map parameters)` Fills the compiled report design loaded from the supplied input stream and writes the generated report object to the output stream specified by the second parameter.
`static void` | `fillReportToStream(java.io.InputStream inputStream, java.io.OutputStream outputStream, java.util.Map parameters, java.sql.Connection connection)` Fills the compiled report design loaded from the supplied input stream and writes the generated report object to the output stream specified by the second parameter.
`static void` | `fillReportToStream(java.io.InputStream inputStream, java.io.OutputStream outputStream, java.util.Map parameters, JRDataSource dataSource)` Fills the compiled report design loaded from the supplied input stream and writes the generated report object to the output stream specified by the second parameter.
`static void` | `fillReportToStream(JasperReport jasperReport, java.io.OutputStream outputStream, java.util.Map parameters)` Fills the compiled report design supplied as the first parameter and writes the generated report object to the output stream specified by the second parameter.
`static void` | `fillReportToStream(JasperReport jasperReport, java.io.OutputStream outputStream, java.util.Map parameters, java.sql.Connection connection)` Fills the compiled report design supplied as the first parameter and writes the generated report object to the output stream specified by the second parameter.
`static void` | `fillReportToStream(JasperReport jasperReport, java.io.OutputStream outputStream, java.util.Map parameters, JRDataSource dataSource)` Fills the compiled report design supplied as the first parameter and writes the generated report object to the output stream specified by the second parameter.
`protected static java.util.Map` | `setFileResolver(java.io.File file, java.util.Map params)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### fillReportToFile

    public static java.lang.String fillReportToFile(java.lang.String sourceFileName,
                                                    java.util.Map params,
                                                    java.sql.Connection connection)
                                             throws JRException

  Fills the compiled report design loaded from the specified file. The result of this operation is another file that will contain the serialized `JasperPrint` object representing the generated document, having the same name as the report design as declared in the source file, plus the `*.jrprint` extension, located in the same directory as the source file.

  Parameters:
    `sourceFileName` - source file containing the compile report design
    `params` - report parameters map
    `connection` - JDBC connection object to use for executing the report internal SQL query
  Throws:
    `JRException`

### fillReportToFile

    public static java.lang.String fillReportToFile(java.lang.String sourceFileName,
                                                    java.util.Map params)
                                             throws JRException

  Fills the compiled report design loaded from the specified file. The result of this operation is another file that will contain the serialized `JasperPrint` object representing the generated document, having the same name as the report design as declared in the source file, plus the `*.jrprint` extension, located in the same directory as the source file.

  Parameters:
    `sourceFileName` - source file containing the compile report design
    `params` - report parameters map
  Throws:
    `JRException`
  See Also:
    `JRFiller.fillReport(JasperReport, Map)`

### fillReportToFile

    public static void fillReportToFile(java.lang.String sourceFileName,
                                        java.lang.String destFileName,
                                        java.util.Map params,
                                        java.sql.Connection connection)
                                 throws JRException

  Fills the compiled report design loaded from the file received as the first parameter and places the result in the file specified by the second parameter.

  Parameters:
    `sourceFileName` - source file containing the compile report design
    `destFileName` - file name to place the generated report into
    `params` - report parameters map
    `connection` - JDBC connection object to use for executing the report internal SQL query
  Throws:
    `JRException`

### fillReportToFile

    public static void fillReportToFile(java.lang.String sourceFileName,
                                        java.lang.String destFileName,
                                        java.util.Map params)
                                 throws JRException

  Fills the compiled report design loaded from the file received as the first parameter and places the result in the file specified by the second parameter.

  Parameters:
    `sourceFileName` - source file containing the compile report design
    `destFileName` - file name to place the generated report into
    `params` - report parameters map
  Throws:
    `JRException`
  See Also:
    `JRFiller.fillReport(JasperReport, Map)`

### fillReportToFile

    public static void fillReportToFile(JasperReport jasperReport,
                                        java.lang.String destFileName,
                                        java.util.Map parameters,
                                        java.sql.Connection connection)
                                 throws JRException

  Fills the compiled report design received as the first parameter and places the result in the file specified by the second parameter.

  Parameters:
    `jasperReport` - compiled report design object to use for filling
    `destFileName` - file name to place the generated report into
    `parameters` - report parameters map
    `connection` - JDBC connection object to use for executing the report internal SQL query
  Throws:
    `JRException`

### fillReportToFile

    public static void fillReportToFile(JasperReport jasperReport,
                                        java.lang.String destFileName,
                                        java.util.Map parameters)
                                 throws JRException

  Fills the compiled report design received as the first parameter and places the result in the file specified by the second parameter.

  Parameters:
    `jasperReport` - compiled report design object to use for filling
    `destFileName` - file name to place the generated report into
    `parameters` - report parameters map
  Throws:
    `JRException`
  See Also:
    `JRFiller.fillReport(JasperReport, Map)`

### fillReport

    public static JasperPrint fillReport(java.lang.String sourceFileName,
                                         java.util.Map params,
                                         java.sql.Connection connection)
                                  throws JRException

  Fills the compiled report design loaded from the specified file and returns the generated report object.

  Parameters:
    `sourceFileName` - source file containing the compile report design
    `params` - report parameters map
    `connection` - JDBC connection object to use for executing the report internal SQL query
  Returns:
    generated report object
  Throws:
    `JRException`

### fillReport

    public static JasperPrint fillReport(java.lang.String sourceFileName,
                                         java.util.Map params)
                                  throws JRException

  Fills the compiled report design loaded from the specified file and returns the generated report object.

  Parameters:
    `sourceFileName` - source file containing the compile report design
    `params` - report parameters map
  Returns:
    generated report object
  Throws:
    `JRException`
  See Also:
    `JRFiller.fillReport(JasperReport, Map)`

### fillReportToStream

    public static void fillReportToStream(java.io.InputStream inputStream,
                                          java.io.OutputStream outputStream,
                                          java.util.Map parameters,
                                          java.sql.Connection connection)
                                   throws JRException

  Fills the compiled report design loaded from the supplied input stream and writes the generated report object to the output stream specified by the second parameter.

  Parameters:
    `inputStream` - input stream to read the compiled report design object from
    `outputStream` - output stream to write the generated report object to
    `parameters` - report parameters map
    `connection` - JDBC connection object to use for executing the report internal SQL query
  Throws:
    `JRException`

### fillReportToStream

    public static void fillReportToStream(java.io.InputStream inputStream,
                                          java.io.OutputStream outputStream,
                                          java.util.Map parameters)
                                   throws JRException

  Fills the compiled report design loaded from the supplied input stream and writes the generated report object to the output stream specified by the second parameter.

  Parameters:
    `inputStream` - input stream to read the compiled report design object from
    `outputStream` - output stream to write the generated report object to
    `parameters` - report parameters map
  Throws:
    `JRException`
  See Also:
    `JRFiller.fillReport(JasperReport, Map)`

### fillReportToStream

    public static void fillReportToStream(JasperReport jasperReport,
                                          java.io.OutputStream outputStream,
                                          java.util.Map parameters,
                                          java.sql.Connection connection)
                                   throws JRException

  Fills the compiled report design supplied as the first parameter and writes the generated report object to the output stream specified by the second parameter.

  Parameters:
    `jasperReport` - compiled report design object to use for filling
    `outputStream` - output stream to write the generated report object to
    `parameters` - report parameters map
    `connection` - JDBC connection object to use for executing the report internal SQL query
  Throws:
    `JRException`

### fillReportToStream

    public static void fillReportToStream(JasperReport jasperReport,
                                          java.io.OutputStream outputStream,
                                          java.util.Map parameters)
                                   throws JRException

  Fills the compiled report design supplied as the first parameter and writes the generated report object to the output stream specified by the second parameter.

  Parameters:
    `jasperReport` - compiled report design object to use for filling
    `outputStream` - output stream to write the generated report object to
    `parameters` - report parameters map
  Throws:
    `JRException`
  See Also:
    `JRFiller.fillReport(JasperReport, Map)`

### fillReport

    public static JasperPrint fillReport(java.io.InputStream inputStream,
                                         java.util.Map parameters,
                                         java.sql.Connection connection)
                                  throws JRException

  Fills the compiled report design loaded from the supplied input stream and returns the generated report object.

  Parameters:
    `inputStream` - input stream to read the compiled report design object from
    `parameters` - report parameters map
    `connection` - JDBC connection object to use for executing the report internal SQL query
  Returns:
    generated report object
  Throws:
    `JRException`

### fillReport

    public static JasperPrint fillReport(java.io.InputStream inputStream,
                                         java.util.Map parameters)
                                  throws JRException

  Fills the compiled report design loaded from the supplied input stream and returns the generated report object.

  Parameters:
    `inputStream` - input stream to read the compiled report design object from
    `parameters` - report parameters map
  Returns:
    generated report object
  Throws:
    `JRException`
  See Also:
    `JRFiller.fillReport(JasperReport, Map)`

### fillReport

    public static JasperPrint fillReport(JasperReport jasperReport,
                                         java.util.Map parameters,
                                         java.sql.Connection connection)
                                  throws JRException

  Fills the compiled report design supplied as the first parameter and returns the generated report object.

  Parameters:
    `jasperReport` - compiled report design object to use for filling
    `parameters` - report parameters map
    `connection` - JDBC connection object to use for executing the report internal SQL query
  Returns:
    generated report object
  Throws:
    `JRException`

### fillReport

    public static JasperPrint fillReport(JasperReport jasperReport,
                                         java.util.Map parameters)
                                  throws JRException

  Fills the compiled report design supplied as the first parameter and returns the generated report object.

  Parameters:
    `jasperReport` - compiled report design object to use for filling
    `parameters` - report parameters map
  Returns:
    generated report object
  Throws:
    `JRException`
  See Also:
    `JRFiller.fillReport(JasperReport, Map)`

### fillReportToFile

    public static java.lang.String fillReportToFile(java.lang.String sourceFileName,
                                                    java.util.Map params,
                                                    JRDataSource dataSource)
                                             throws JRException

  Fills the compiled report design loaded from the specified file. The result of this operation is another file that will contain the serialized `JasperPrint` object representing the generated document, having the same name as the report design as declared in the source file, plus the `*.jrprint` extension, located in the same directory as the source file.

  Parameters:
    `sourceFileName` - source file containing the compile report design
    `params` - report parameters map
    `dataSource` - data source object
  Throws:
    `JRException`

### fillReportToFile

    public static void fillReportToFile(java.lang.String sourceFileName,
                                        java.lang.String destFileName,
                                        java.util.Map params,
                                        JRDataSource dataSource)
                                 throws JRException

  Fills the compiled report design loaded from the file received as the first parameter and places the result in the file specified by the second parameter.

  Parameters:
    `sourceFileName` - source file containing the compile report design
    `destFileName` - file name to place the generated report into
    `params` - report parameters map
    `dataSource` - data source object
  Throws:
    `JRException`

### fillReportToFile

    public static void fillReportToFile(JasperReport jasperReport,
                                        java.lang.String destFileName,
                                        java.util.Map parameters,
                                        JRDataSource dataSource)
                                 throws JRException

  Fills the compiled report design received as the first parameter and places the result in the file specified by the second parameter.

  Parameters:
    `jasperReport` - compiled report design object to use for filling
    `destFileName` - file name to place the generated report into
    `parameters` - report parameters map
    `dataSource` - data source object
  Throws:
    `JRException`

### fillReport

    public static JasperPrint fillReport(java.lang.String sourceFileName,
                                         java.util.Map params,
                                         JRDataSource dataSource)
                                  throws JRException

  Fills the compiled report design loaded from the specified file and returns the generated report object.

  Parameters:
    `sourceFileName` - source file containing the compile report design
    `params` - report parameters map
    `dataSource` - data source object
  Returns:
    generated report object
  Throws:
    `JRException`

### fillReportToStream

    public static void fillReportToStream(java.io.InputStream inputStream,
                                          java.io.OutputStream outputStream,
                                          java.util.Map parameters,
                                          JRDataSource dataSource)
                                   throws JRException

  Fills the compiled report design loaded from the supplied input stream and writes the generated report object to the output stream specified by the second parameter.

  Parameters:
    `inputStream` - input stream to read the compiled report design object from
    `outputStream` - output stream to write the generated report object to
    `parameters` - report parameters map
    `dataSource` - data source object
  Throws:
    `JRException`

### fillReportToStream

    public static void fillReportToStream(JasperReport jasperReport,
                                          java.io.OutputStream outputStream,
                                          java.util.Map parameters,
                                          JRDataSource dataSource)
                                   throws JRException

  Fills the compiled report design supplied as the first parameter and writes the generated report object to the output stream specified by the second parameter.

  Parameters:
    `jasperReport` - compiled report design object to use for filling
    `outputStream` - output stream to write the generated report object to
    `parameters` - report parameters map
    `dataSource` - data source object
  Throws:
    `JRException`

### fillReport

    public static JasperPrint fillReport(java.io.InputStream inputStream,
                                         java.util.Map parameters,
                                         JRDataSource dataSource)
                                  throws JRException

  Fills the compiled report design loaded from the supplied input stream and returns the generated report object.

  Parameters:
    `inputStream` - input stream to read the compiled report design object from
    `parameters` - report parameters map
    `dataSource` - data source object
  Returns:
    generated report object
  Throws:
    `JRException`

### fillReport

    public static JasperPrint fillReport(JasperReport jasperReport,
                                         java.util.Map parameters,
                                         JRDataSource dataSource)
                                  throws JRException

  Fills the compiled report design supplied as the first parameter and returns the generated report object.

  Parameters:
    `jasperReport` - compiled report design object to use for filling
    `parameters` - report parameters map
    `dataSource` - data source object
  Returns:
    generated report object
  Throws:
    `JRException`

### setFileResolver

    protected static java.util.Map setFileResolver(java.io.File file,
                                                   java.util.Map params)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com