public final class JasperRunManager extends Object
Sometimes it is useful to produce documents only in a popular format such as PDF or
HTML, without having to store on disk the serialized, intermediate
JasperPrint object produced by the report-filling
process.
This can be achieved using this manager class, which immediately exports the document produced by the report-filling process into the desired output format.
| Modifier and Type | Method and Description |
|---|---|
static JasperRunManager |
getInstance(JasperReportsContext jasperReportsContext) |
static String |
runReportToHtmlFile(String sourceFileName,
Map<String,Object> params) |
static String |
runReportToHtmlFile(String sourceFileName,
Map<String,Object> params,
Connection conn) |
static String |
runReportToHtmlFile(String sourceFileName,
Map<String,Object> params,
JRDataSource jrDataSource) |
static void |
runReportToHtmlFile(String sourceFileName,
String destFileName,
Map<String,Object> parameters) |
static void |
runReportToHtmlFile(String sourceFileName,
String destFileName,
Map<String,Object> parameters,
Connection conn) |
static void |
runReportToHtmlFile(String sourceFileName,
String destFileName,
Map<String,Object> parameters,
JRDataSource jrDataSource) |
static byte[] |
runReportToPdf(InputStream inputStream,
Map<String,Object> parameters) |
static byte[] |
runReportToPdf(InputStream inputStream,
Map<String,Object> parameters,
Connection conn) |
static byte[] |
runReportToPdf(InputStream inputStream,
Map<String,Object> parameters,
JRDataSource jrDataSource) |
static byte[] |
runReportToPdf(JasperReport jasperReport,
Map<String,Object> parameters) |
static byte[] |
runReportToPdf(JasperReport jasperReport,
Map<String,Object> parameters,
Connection conn) |
static byte[] |
runReportToPdf(JasperReport jasperReport,
Map<String,Object> parameters,
JRDataSource jrDataSource) |
static byte[] |
runReportToPdf(String sourceFileName,
Map<String,Object> parameters) |
static byte[] |
runReportToPdf(String sourceFileName,
Map<String,Object> parameters,
Connection conn) |
static byte[] |
runReportToPdf(String sourceFileName,
Map<String,Object> parameters,
JRDataSource jrDataSource) |
static String |
runReportToPdfFile(String sourceFileName,
Map<String,Object> params) |
static String |
runReportToPdfFile(String sourceFileName,
Map<String,Object> params,
Connection conn) |
static String |
runReportToPdfFile(String sourceFileName,
Map<String,Object> params,
JRDataSource jrDataSource) |
static void |
runReportToPdfFile(String sourceFileName,
String destFileName,
Map<String,Object> parameters) |
static void |
runReportToPdfFile(String sourceFileName,
String destFileName,
Map<String,Object> parameters,
Connection conn) |
static void |
runReportToPdfFile(String sourceFileName,
String destFileName,
Map<String,Object> parameters,
JRDataSource jrDataSource) |
static void |
runReportToPdfStream(InputStream inputStream,
OutputStream outputStream,
Map<String,Object> parameters) |
static void |
runReportToPdfStream(InputStream inputStream,
OutputStream outputStream,
Map<String,Object> parameters,
Connection conn) |
static void |
runReportToPdfStream(InputStream inputStream,
OutputStream outputStream,
Map<String,Object> parameters,
JRDataSource jrDataSource) |
String |
runToHtmlFile(String sourceFileName,
Map<String,Object> params)
Fills a report and saves it directly into a HTML file.
|
String |
runToHtmlFile(String sourceFileName,
Map<String,Object> params,
Connection conn)
Fills a report and saves it directly into a HTML file.
|
String |
runToHtmlFile(String sourceFileName,
Map<String,Object> params,
JRDataSource jrDataSource)
Fills a report and saves it directly into a HTML file.
|
void |
runToHtmlFile(String sourceFileName,
String destFileName,
Map<String,Object> parameters)
Fills a report and saves it directly into a HTML file.
|
void |
runToHtmlFile(String sourceFileName,
String destFileName,
Map<String,Object> parameters,
Connection conn)
Fills a report and saves it directly into a HTML file.
|
void |
runToHtmlFile(String sourceFileName,
String destFileName,
Map<String,Object> parameters,
JRDataSource jrDataSource)
Fills a report and saves it directly into a HTML file.
|
byte[] |
runToPdf(InputStream inputStream,
Map<String,Object> parameters)
Fills a report and returns byte array object containing the report in PDF format.
|
byte[] |
runToPdf(InputStream inputStream,
Map<String,Object> parameters,
Connection conn)
Fills a report and returns byte array object containing the report in PDF format.
|
byte[] |
runToPdf(InputStream inputStream,
Map<String,Object> parameters,
JRDataSource jrDataSource)
Fills a report and returns byte array object containing the report in PDF format.
|
byte[] |
runToPdf(JasperReport jasperReport,
Map<String,Object> parameters)
Fills a report and returns byte array object containing the report in PDF format.
|
byte[] |
runToPdf(JasperReport jasperReport,
Map<String,Object> parameters,
Connection conn)
Fills a report and returns byte array object containing the report in PDF format.
|
byte[] |
runToPdf(JasperReport jasperReport,
Map<String,Object> parameters,
JRDataSource jrDataSource)
Fills a report and returns byte array object containing the report in PDF format.
|
byte[] |
runToPdf(String sourceFileName,
Map<String,Object> parameters)
Fills a report and returns byte array object containing the report in PDF format.
|
byte[] |
runToPdf(String sourceFileName,
Map<String,Object> parameters,
Connection conn)
Fills a report and returns byte array object containing the report in PDF format.
|
byte[] |
runToPdf(String sourceFileName,
Map<String,Object> parameters,
JRDataSource jrDataSource)
Fills a report and sends it to an output stream in PDF format.
|
String |
runToPdfFile(String sourceFileName,
Map<String,Object> params)
Fills a report and saves it directly into a PDF file.
|
String |
runToPdfFile(String sourceFileName,
Map<String,Object> params,
Connection conn)
Fills a report and saves it directly into a PDF file.
|
String |
runToPdfFile(String sourceFileName,
Map<String,Object> params,
JRDataSource jrDataSource)
Fills a report and saves it directly into a PDF file.
|
void |
runToPdfFile(String sourceFileName,
String destFileName,
Map<String,Object> parameters)
Fills a report and saves it directly into a PDF file.
|
void |
runToPdfFile(String sourceFileName,
String destFileName,
Map<String,Object> parameters,
Connection conn)
Fills a report and saves it directly into a PDF file.
|
void |
runToPdfFile(String sourceFileName,
String destFileName,
Map<String,Object> parameters,
JRDataSource jrDataSource)
Fills a report and saves it directly into a PDF file.
|
void |
runToPdfStream(InputStream inputStream,
OutputStream outputStream,
Map<String,Object> parameters)
Fills a report and sends it directly to an OutputStream in PDF format.
|
void |
runToPdfStream(InputStream inputStream,
OutputStream outputStream,
Map<String,Object> parameters,
Connection conn)
Fills a report and sends it directly to an OutputStream in PDF format.
|
void |
runToPdfStream(InputStream inputStream,
OutputStream outputStream,
Map<String,Object> parameters,
JRDataSource jrDataSource)
Fills a report and sends it directly to an OutputStream in PDF format.
|
public static JasperRunManager getInstance(JasperReportsContext jasperReportsContext)
public String runToPdfFile(String sourceFileName, Map<String,Object> params, Connection conn) throws JRException
JRExceptionpublic String runToPdfFile(String sourceFileName, Map<String,Object> params) throws JRException
sourceFileName - the name of the compiled report fileparams - the parameters mapJRExceptionJRFiller.fill(JasperReportsContext, JasperReport, Map)public void runToPdfFile(String sourceFileName, String destFileName, Map<String,Object> parameters, Connection conn) throws JRException
JRExceptionpublic void runToPdfFile(String sourceFileName, String destFileName, Map<String,Object> parameters) throws JRException
sourceFileName - source file containing the compile report designdestFileName - PDF destination file nameparameters - report parameters mapJRExceptionJRFiller.fill(JasperReportsContext, JasperReport, Map)public void runToPdfStream(InputStream inputStream, OutputStream outputStream, Map<String,Object> parameters, Connection conn) throws JRException
JRExceptionpublic void runToPdfStream(InputStream inputStream, OutputStream outputStream, Map<String,Object> parameters) throws JRException
inputStream - compiled report input streamoutputStream - PDF output streamparameters - parameters mapJRExceptionJRFiller.fill(JasperReportsContext, JasperReport, Map)public byte[] runToPdf(String sourceFileName, Map<String,Object> parameters, Connection conn) throws JRException
JRExceptionpublic byte[] runToPdf(String sourceFileName, Map<String,Object> parameters) throws JRException
sourceFileName - source file containing the compile report designparameters - report parameters mapJRExceptionJRFiller.fill(JasperReportsContext, JasperReport, Map)public byte[] runToPdf(InputStream inputStream, Map<String,Object> parameters, Connection conn) throws JRException
JRExceptionpublic byte[] runToPdf(InputStream inputStream, Map<String,Object> parameters) throws JRException
inputStream - input stream to read the compiled report design object fromparameters - report parameters mapJRExceptionJRFiller.fill(JasperReportsContext, JasperReport, Map)public byte[] runToPdf(JasperReport jasperReport, Map<String,Object> parameters, Connection conn) throws JRException
JRExceptionpublic byte[] runToPdf(JasperReport jasperReport, Map<String,Object> parameters) throws JRException
jasperReport - the compiled reportparameters - the parameters mapJRExceptionJRFiller.fill(JasperReportsContext, JasperReport, Map)public String runToPdfFile(String sourceFileName, Map<String,Object> params, JRDataSource jrDataSource) throws JRException
JRExceptionpublic void runToPdfFile(String sourceFileName, String destFileName, Map<String,Object> parameters, JRDataSource jrDataSource) throws JRException
JRExceptionpublic void runToPdfStream(InputStream inputStream, OutputStream outputStream, Map<String,Object> parameters, JRDataSource jrDataSource) throws JRException
JRExceptionpublic byte[] runToPdf(String sourceFileName, Map<String,Object> parameters, JRDataSource jrDataSource) throws JRException
JRExceptionpublic byte[] runToPdf(InputStream inputStream, Map<String,Object> parameters, JRDataSource jrDataSource) throws JRException
JRExceptionpublic byte[] runToPdf(JasperReport jasperReport, Map<String,Object> parameters, JRDataSource jrDataSource) throws JRException
JRExceptionpublic String runToHtmlFile(String sourceFileName, Map<String,Object> params, Connection conn) throws JRException
JRExceptionpublic String runToHtmlFile(String sourceFileName, Map<String,Object> params) throws JRException
sourceFileName - the name of the compiled report fileparams - the parameters mapJRExceptionJRFiller.fill(JasperReportsContext, JasperReport, Map)public void runToHtmlFile(String sourceFileName, String destFileName, Map<String,Object> parameters, Connection conn) throws JRException
JRExceptionpublic void runToHtmlFile(String sourceFileName, String destFileName, Map<String,Object> parameters) throws JRException
sourceFileName - source file containing the compile report designdestFileName - name of the destination HTML fileparameters - report parameters mapJRExceptionJRFiller.fill(JasperReportsContext, JasperReport, Map)public String runToHtmlFile(String sourceFileName, Map<String,Object> params, JRDataSource jrDataSource) throws JRException
JRExceptionpublic void runToHtmlFile(String sourceFileName, String destFileName, Map<String,Object> parameters, JRDataSource jrDataSource) throws JRException
JRExceptionpublic static String runReportToPdfFile(String sourceFileName, Map<String,Object> params, Connection conn) throws JRException
JRExceptionrunToPdfFile(String, Map, Connection)public static String runReportToPdfFile(String sourceFileName, Map<String,Object> params) throws JRException
JRExceptionrunToPdfFile(String, Map)public static void runReportToPdfFile(String sourceFileName, String destFileName, Map<String,Object> parameters, Connection conn) throws JRException
JRExceptionrunToPdfFile(String, String, Map, Connection)public static void runReportToPdfFile(String sourceFileName, String destFileName, Map<String,Object> parameters) throws JRException
JRExceptionrunToPdfFile(String, String, Map)public static void runReportToPdfStream(InputStream inputStream, OutputStream outputStream, Map<String,Object> parameters, Connection conn) throws JRException
JRExceptionrunToPdfStream(InputStream, OutputStream, Map, Connection)public static void runReportToPdfStream(InputStream inputStream, OutputStream outputStream, Map<String,Object> parameters) throws JRException
JRExceptionrunToPdfStream(InputStream, OutputStream, Map)public static byte[] runReportToPdf(String sourceFileName, Map<String,Object> parameters, Connection conn) throws JRException
JRExceptionrunToPdf(String, Map, Connection)public static byte[] runReportToPdf(String sourceFileName, Map<String,Object> parameters) throws JRException
JRExceptionrunToPdf(String, Map)public static byte[] runReportToPdf(InputStream inputStream, Map<String,Object> parameters, Connection conn) throws JRException
JRExceptionrunToPdf(InputStream, Map, Connection)public static byte[] runReportToPdf(InputStream inputStream, Map<String,Object> parameters) throws JRException
JRExceptionrunToPdf(InputStream, Map)public static byte[] runReportToPdf(JasperReport jasperReport, Map<String,Object> parameters, Connection conn) throws JRException
JRExceptionrunToPdf(JasperReport, Map, Connection)public static byte[] runReportToPdf(JasperReport jasperReport, Map<String,Object> parameters) throws JRException
JRExceptionrunToPdf(JasperReport, Map)public static String runReportToPdfFile(String sourceFileName, Map<String,Object> params, JRDataSource jrDataSource) throws JRException
JRExceptionrunToPdfFile(String, Map, JRDataSource)public static void runReportToPdfFile(String sourceFileName, String destFileName, Map<String,Object> parameters, JRDataSource jrDataSource) throws JRException
JRExceptionrunToPdfFile(String, String, Map, JRDataSource)public static void runReportToPdfStream(InputStream inputStream, OutputStream outputStream, Map<String,Object> parameters, JRDataSource jrDataSource) throws JRException
JRExceptionrunToPdfStream(InputStream, OutputStream, Map, JRDataSource)public static byte[] runReportToPdf(String sourceFileName, Map<String,Object> parameters, JRDataSource jrDataSource) throws JRException
JRExceptionrunToPdf(String, Map, JRDataSource)public static byte[] runReportToPdf(InputStream inputStream, Map<String,Object> parameters, JRDataSource jrDataSource) throws JRException
JRExceptionrunToPdf(InputStream, Map, JRDataSource)public static byte[] runReportToPdf(JasperReport jasperReport, Map<String,Object> parameters, JRDataSource jrDataSource) throws JRException
JRExceptionrunToPdf(JasperReport, Map, JRDataSource)public static String runReportToHtmlFile(String sourceFileName, Map<String,Object> params, Connection conn) throws JRException
JRExceptionrunToHtmlFile(String, Map, Connection)public static String runReportToHtmlFile(String sourceFileName, Map<String,Object> params) throws JRException
JRExceptionrunToHtmlFile(String, Map)public static void runReportToHtmlFile(String sourceFileName, String destFileName, Map<String,Object> parameters, Connection conn) throws JRException
JRExceptionrunToHtmlFile(String, String, Map, Connection)public static void runReportToHtmlFile(String sourceFileName, String destFileName, Map<String,Object> parameters) throws JRException
JRExceptionrunToHtmlFile(String, String, Map)public static String runReportToHtmlFile(String sourceFileName, Map<String,Object> params, JRDataSource jrDataSource) throws JRException
JRExceptionrunToHtmlFile(String, Map, JRDataSource)public static void runReportToHtmlFile(String sourceFileName, String destFileName, Map<String,Object> parameters, JRDataSource jrDataSource) throws JRException
JRExceptionrunToHtmlFile(String, String, Map, JRDataSource)Copyright © 2017. All rights reserved.