|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jasperreports.engine.JasperFillManager
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:
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
Constructor Summary | |
JasperFillManager()
|
Method Summary | |
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,
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 parameters,
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 parameters,
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,
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 parameters,
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 parameters,
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 parameters,
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 parameters,
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,
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,
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JasperFillManager()
Method Detail |
public static java.lang.String fillReportToFile(java.lang.String sourceFileName, java.util.Map parameters, 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 designparameters
- report parameters mapconnection
- JDBC connection object to use for executing the report internal SQL query
JRException
public static void fillReportToFile(java.lang.String sourceFileName, java.lang.String destFileName, java.util.Map parameters, java.sql.Connection connection) throws JRException
sourceFileName
- source file containing the compile report designdestFileName
- file name to place the generated report intoparameters
- report parameters mapconnection
- JDBC connection object to use for executing the report internal SQL query
JRException
public static void fillReportToFile(JasperReport jasperReport, java.lang.String destFileName, java.util.Map 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 query
JRException
public static JasperPrint fillReport(java.lang.String sourceFileName, java.util.Map parameters, java.sql.Connection connection) throws JRException
sourceFileName
- source file containing the compile report designparameters
- report parameters mapconnection
- JDBC connection object to use for executing the report internal SQL query
JRException
public static void fillReportToStream(java.io.InputStream inputStream, java.io.OutputStream outputStream, java.util.Map 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 query
JRException
public static void fillReportToStream(JasperReport jasperReport, java.io.OutputStream outputStream, java.util.Map 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 query
JRException
public static JasperPrint fillReport(java.io.InputStream inputStream, java.util.Map 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 query
JRException
public static JasperPrint fillReport(JasperReport jasperReport, java.util.Map 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 query
JRException
public static java.lang.String fillReportToFile(java.lang.String sourceFileName, java.util.Map parameters, 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 designparameters
- report parameters mapdataSource
- data source object
JRException
public static void fillReportToFile(java.lang.String sourceFileName, java.lang.String destFileName, java.util.Map parameters, JRDataSource dataSource) throws JRException
sourceFileName
- source file containing the compile report designdestFileName
- file name to place the generated report intoparameters
- report parameters mapdataSource
- data source object
JRException
public static void fillReportToFile(JasperReport jasperReport, java.lang.String destFileName, java.util.Map 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 object
JRException
public static JasperPrint fillReport(java.lang.String sourceFileName, java.util.Map parameters, JRDataSource dataSource) throws JRException
sourceFileName
- source file containing the compile report designparameters
- report parameters mapdataSource
- data source object
JRException
public static void fillReportToStream(java.io.InputStream inputStream, java.io.OutputStream outputStream, java.util.Map 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 object
JRException
public static void fillReportToStream(JasperReport jasperReport, java.io.OutputStream outputStream, java.util.Map 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 object
JRException
public static JasperPrint fillReport(java.io.InputStream inputStream, java.util.Map parameters, JRDataSource dataSource) throws JRException
inputStream
- input stream to read the compiled report design object fromparameters
- report parameters mapdataSource
- data source object
JRException
public static JasperPrint fillReport(JasperReport jasperReport, java.util.Map parameters, JRDataSource dataSource) throws JRException
jasperReport
- compiled report design object to use for fillingparameters
- report parameters mapdataSource
- data source object
JRException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |