public final class JasperFillManager
extends java.lang.Object
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:
JRDataSource
interface
and use it directly for retrieving report data;
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.
JasperReport
,
JRDataSource
,
JRFiller
,
JasperPrint
Modifier and Type | Method and Description |
---|---|
static JasperPrint |
fillReport(java.io.InputStream inputStream,
java.util.Map<java.lang.String,java.lang.Object> 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<java.lang.String,java.lang.Object> 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<java.lang.String,java.lang.Object> 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<java.lang.String,java.lang.Object> 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<java.lang.String,java.lang.Object> 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<java.lang.String,java.lang.Object> 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<java.lang.String,java.lang.Object> 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<java.lang.String,java.lang.Object> 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<java.lang.String,java.lang.Object> 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<java.lang.String,java.lang.Object> 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<java.lang.String,java.lang.Object> 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<java.lang.String,java.lang.Object> 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<java.lang.String,java.lang.Object> params)
Fills the compiled report design loaded from the specified file.
|
static java.lang.String |
fillReportToFile(java.lang.String sourceFileName,
java.util.Map<java.lang.String,java.lang.Object> 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<java.lang.String,java.lang.Object> 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<java.lang.String,java.lang.Object> 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<java.lang.String,java.lang.Object> 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<java.lang.String,java.lang.Object> 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<java.lang.String,java.lang.Object> 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<java.lang.String,java.lang.Object> 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<java.lang.String,java.lang.Object> 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<java.lang.String,java.lang.Object> 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<java.lang.String,java.lang.Object> 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<java.lang.String,java.lang.Object> 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<java.lang.String,java.lang.Object> |
setFileResolver(java.io.File file,
java.util.Map<java.lang.String,java.lang.Object> params) |
public static java.lang.String fillReportToFile(java.lang.String sourceFileName, java.util.Map<java.lang.String,java.lang.Object> params, java.sql.Connection connection) throws JRException
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.sourceFileName
- source file containing the compile report designparams
- report parameters mapconnection
- JDBC connection object to use for executing the report internal SQL queryJRException
public static java.lang.String fillReportToFile(java.lang.String sourceFileName, java.util.Map<java.lang.String,java.lang.Object> params) throws JRException
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.sourceFileName
- source file containing the compile report designparams
- report parameters mapJRException
JRFiller.fillReport(JasperReport, Map)
public static void fillReportToFile(java.lang.String sourceFileName, java.lang.String destFileName, java.util.Map<java.lang.String,java.lang.Object> params, java.sql.Connection connection) throws JRException
sourceFileName
- source file containing the compile report designdestFileName
- file name to place the generated report intoparams
- report parameters mapconnection
- JDBC connection object to use for executing the report internal SQL queryJRException
public static void fillReportToFile(java.lang.String sourceFileName, java.lang.String destFileName, java.util.Map<java.lang.String,java.lang.Object> params) throws JRException
sourceFileName
- source file containing the compile report designdestFileName
- file name to place the generated report intoparams
- report parameters mapJRException
JRFiller.fillReport(JasperReport, Map)
public static void fillReportToFile(JasperReport jasperReport, java.lang.String destFileName, java.util.Map<java.lang.String,java.lang.Object> parameters, java.sql.Connection connection) throws JRException
jasperReport
- compiled report design object to use for fillingdestFileName
- file name to place the generated report intoparameters
- report parameters mapconnection
- JDBC connection object to use for executing the report internal SQL queryJRException
public static void fillReportToFile(JasperReport jasperReport, java.lang.String destFileName, java.util.Map<java.lang.String,java.lang.Object> parameters) throws JRException
jasperReport
- compiled report design object to use for fillingdestFileName
- file name to place the generated report intoparameters
- report parameters mapJRException
JRFiller.fillReport(JasperReport, Map)
public static JasperPrint fillReport(java.lang.String sourceFileName, java.util.Map<java.lang.String,java.lang.Object> params, java.sql.Connection connection) throws JRException
sourceFileName
- source file containing the compile report designparams
- report parameters mapconnection
- JDBC connection object to use for executing the report internal SQL queryJRException
public static JasperPrint fillReport(java.lang.String sourceFileName, java.util.Map<java.lang.String,java.lang.Object> params) throws JRException
sourceFileName
- source file containing the compile report designparams
- report parameters mapJRException
JRFiller.fillReport(JasperReport, Map)
public static void fillReportToStream(java.io.InputStream inputStream, java.io.OutputStream outputStream, java.util.Map<java.lang.String,java.lang.Object> parameters, java.sql.Connection connection) throws JRException
inputStream
- input stream to read the compiled report design object fromoutputStream
- output stream to write the generated report object toparameters
- report parameters mapconnection
- JDBC connection object to use for executing the report internal SQL queryJRException
public static void fillReportToStream(java.io.InputStream inputStream, java.io.OutputStream outputStream, java.util.Map<java.lang.String,java.lang.Object> parameters) throws JRException
inputStream
- input stream to read the compiled report design object fromoutputStream
- output stream to write the generated report object toparameters
- report parameters mapJRException
JRFiller.fillReport(JasperReport, Map)
public static void fillReportToStream(JasperReport jasperReport, java.io.OutputStream outputStream, java.util.Map<java.lang.String,java.lang.Object> parameters, java.sql.Connection connection) throws JRException
jasperReport
- compiled report design object to use for fillingoutputStream
- output stream to write the generated report object toparameters
- report parameters mapconnection
- JDBC connection object to use for executing the report internal SQL queryJRException
public static void fillReportToStream(JasperReport jasperReport, java.io.OutputStream outputStream, java.util.Map<java.lang.String,java.lang.Object> parameters) throws JRException
jasperReport
- compiled report design object to use for fillingoutputStream
- output stream to write the generated report object toparameters
- report parameters mapJRException
JRFiller.fillReport(JasperReport, Map)
public static JasperPrint fillReport(java.io.InputStream inputStream, java.util.Map<java.lang.String,java.lang.Object> parameters, java.sql.Connection connection) throws JRException
inputStream
- input stream to read the compiled report design object fromparameters
- report parameters mapconnection
- JDBC connection object to use for executing the report internal SQL queryJRException
public static JasperPrint fillReport(java.io.InputStream inputStream, java.util.Map<java.lang.String,java.lang.Object> parameters) throws JRException
inputStream
- input stream to read the compiled report design object fromparameters
- report parameters mapJRException
JRFiller.fillReport(JasperReport, Map)
public static JasperPrint fillReport(JasperReport jasperReport, java.util.Map<java.lang.String,java.lang.Object> parameters, java.sql.Connection connection) throws JRException
jasperReport
- compiled report design object to use for fillingparameters
- report parameters mapconnection
- JDBC connection object to use for executing the report internal SQL queryJRException
public static JasperPrint fillReport(JasperReport jasperReport, java.util.Map<java.lang.String,java.lang.Object> parameters) throws JRException
jasperReport
- compiled report design object to use for fillingparameters
- report parameters mapJRException
JRFiller.fillReport(JasperReport, Map)
public static java.lang.String fillReportToFile(java.lang.String sourceFileName, java.util.Map<java.lang.String,java.lang.Object> params, JRDataSource dataSource) throws JRException
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.sourceFileName
- source file containing the compile report designparams
- report parameters mapdataSource
- data source objectJRException
public static void fillReportToFile(java.lang.String sourceFileName, java.lang.String destFileName, java.util.Map<java.lang.String,java.lang.Object> params, JRDataSource dataSource) throws JRException
sourceFileName
- source file containing the compile report designdestFileName
- file name to place the generated report intoparams
- report parameters mapdataSource
- data source objectJRException
public static void fillReportToFile(JasperReport jasperReport, java.lang.String destFileName, java.util.Map<java.lang.String,java.lang.Object> parameters, JRDataSource dataSource) throws JRException
jasperReport
- compiled report design object to use for fillingdestFileName
- file name to place the generated report intoparameters
- report parameters mapdataSource
- data source objectJRException
public static JasperPrint fillReport(java.lang.String sourceFileName, java.util.Map<java.lang.String,java.lang.Object> params, JRDataSource dataSource) throws JRException
sourceFileName
- source file containing the compile report designparams
- report parameters mapdataSource
- data source objectJRException
public static void fillReportToStream(java.io.InputStream inputStream, java.io.OutputStream outputStream, java.util.Map<java.lang.String,java.lang.Object> parameters, JRDataSource dataSource) throws JRException
inputStream
- input stream to read the compiled report design object fromoutputStream
- output stream to write the generated report object toparameters
- report parameters mapdataSource
- data source objectJRException
public static void fillReportToStream(JasperReport jasperReport, java.io.OutputStream outputStream, java.util.Map<java.lang.String,java.lang.Object> parameters, JRDataSource dataSource) throws JRException
jasperReport
- compiled report design object to use for fillingoutputStream
- output stream to write the generated report object toparameters
- report parameters mapdataSource
- data source objectJRException
public static JasperPrint fillReport(java.io.InputStream inputStream, java.util.Map<java.lang.String,java.lang.Object> parameters, JRDataSource dataSource) throws JRException
inputStream
- input stream to read the compiled report design object fromparameters
- report parameters mapdataSource
- data source objectJRException
public static JasperPrint fillReport(JasperReport jasperReport, java.util.Map<java.lang.String,java.lang.Object> parameters, JRDataSource dataSource) throws JRException
jasperReport
- compiled report design object to use for fillingparameters
- report parameters mapdataSource
- data source objectJRException
protected static java.util.Map<java.lang.String,java.lang.Object> setFileResolver(java.io.File file, java.util.Map<java.lang.String,java.lang.Object> params)
© 2001-2010 Jaspersoft Corporation www.jaspersoft.com