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
JRException
public String runToPdfFile(String sourceFileName, Map<String,Object> params) throws JRException
sourceFileName
- the name of the compiled report fileparams
- the parameters mapJRException
JRFiller.fill(JasperReportsContext, JasperReport, Map)
public void runToPdfFile(String sourceFileName, String destFileName, Map<String,Object> parameters, Connection conn) throws JRException
JRException
public 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 mapJRException
JRFiller.fill(JasperReportsContext, JasperReport, Map)
public void runToPdfStream(InputStream inputStream, OutputStream outputStream, Map<String,Object> parameters, Connection conn) throws JRException
JRException
public void runToPdfStream(InputStream inputStream, OutputStream outputStream, Map<String,Object> parameters) throws JRException
inputStream
- compiled report input streamoutputStream
- PDF output streamparameters
- parameters mapJRException
JRFiller.fill(JasperReportsContext, JasperReport, Map)
public byte[] runToPdf(String sourceFileName, Map<String,Object> parameters, Connection conn) throws JRException
JRException
public byte[] runToPdf(String sourceFileName, Map<String,Object> parameters) throws JRException
sourceFileName
- source file containing the compile report designparameters
- report parameters mapJRException
JRFiller.fill(JasperReportsContext, JasperReport, Map)
public byte[] runToPdf(InputStream inputStream, Map<String,Object> parameters, Connection conn) throws JRException
JRException
public byte[] runToPdf(InputStream inputStream, Map<String,Object> parameters) throws JRException
inputStream
- input stream to read the compiled report design object fromparameters
- report parameters mapJRException
JRFiller.fill(JasperReportsContext, JasperReport, Map)
public byte[] runToPdf(JasperReport jasperReport, Map<String,Object> parameters, Connection conn) throws JRException
JRException
public byte[] runToPdf(JasperReport jasperReport, Map<String,Object> parameters) throws JRException
jasperReport
- the compiled reportparameters
- the parameters mapJRException
JRFiller.fill(JasperReportsContext, JasperReport, Map)
public String runToPdfFile(String sourceFileName, Map<String,Object> params, JRDataSource jrDataSource) throws JRException
JRException
public void runToPdfFile(String sourceFileName, String destFileName, Map<String,Object> parameters, JRDataSource jrDataSource) throws JRException
JRException
public void runToPdfStream(InputStream inputStream, OutputStream outputStream, Map<String,Object> parameters, JRDataSource jrDataSource) throws JRException
JRException
public byte[] runToPdf(String sourceFileName, Map<String,Object> parameters, JRDataSource jrDataSource) throws JRException
JRException
public byte[] runToPdf(InputStream inputStream, Map<String,Object> parameters, JRDataSource jrDataSource) throws JRException
JRException
public byte[] runToPdf(JasperReport jasperReport, Map<String,Object> parameters, JRDataSource jrDataSource) throws JRException
JRException
public String runToHtmlFile(String sourceFileName, Map<String,Object> params, Connection conn) throws JRException
JRException
public String runToHtmlFile(String sourceFileName, Map<String,Object> params) throws JRException
sourceFileName
- the name of the compiled report fileparams
- the parameters mapJRException
JRFiller.fill(JasperReportsContext, JasperReport, Map)
public void runToHtmlFile(String sourceFileName, String destFileName, Map<String,Object> parameters, Connection conn) throws JRException
JRException
public 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 mapJRException
JRFiller.fill(JasperReportsContext, JasperReport, Map)
public String runToHtmlFile(String sourceFileName, Map<String,Object> params, JRDataSource jrDataSource) throws JRException
JRException
public void runToHtmlFile(String sourceFileName, String destFileName, Map<String,Object> parameters, JRDataSource jrDataSource) throws JRException
JRException
public static String runReportToPdfFile(String sourceFileName, Map<String,Object> params, Connection conn) throws JRException
JRException
runToPdfFile(String, Map, Connection)
public static String runReportToPdfFile(String sourceFileName, Map<String,Object> params) throws JRException
JRException
runToPdfFile(String, Map)
public static void runReportToPdfFile(String sourceFileName, String destFileName, Map<String,Object> parameters, Connection conn) throws JRException
JRException
runToPdfFile(String, String, Map, Connection)
public static void runReportToPdfFile(String sourceFileName, String destFileName, Map<String,Object> parameters) throws JRException
JRException
runToPdfFile(String, String, Map)
public static void runReportToPdfStream(InputStream inputStream, OutputStream outputStream, Map<String,Object> parameters, Connection conn) throws JRException
JRException
runToPdfStream(InputStream, OutputStream, Map, Connection)
public static void runReportToPdfStream(InputStream inputStream, OutputStream outputStream, Map<String,Object> parameters) throws JRException
JRException
runToPdfStream(InputStream, OutputStream, Map)
public static byte[] runReportToPdf(String sourceFileName, Map<String,Object> parameters, Connection conn) throws JRException
JRException
runToPdf(String, Map, Connection)
public static byte[] runReportToPdf(String sourceFileName, Map<String,Object> parameters) throws JRException
JRException
runToPdf(String, Map)
public static byte[] runReportToPdf(InputStream inputStream, Map<String,Object> parameters, Connection conn) throws JRException
JRException
runToPdf(InputStream, Map, Connection)
public static byte[] runReportToPdf(InputStream inputStream, Map<String,Object> parameters) throws JRException
JRException
runToPdf(InputStream, Map)
public static byte[] runReportToPdf(JasperReport jasperReport, Map<String,Object> parameters, Connection conn) throws JRException
JRException
runToPdf(JasperReport, Map, Connection)
public static byte[] runReportToPdf(JasperReport jasperReport, Map<String,Object> parameters) throws JRException
JRException
runToPdf(JasperReport, Map)
public static String runReportToPdfFile(String sourceFileName, Map<String,Object> params, JRDataSource jrDataSource) throws JRException
JRException
runToPdfFile(String, Map, JRDataSource)
public static void runReportToPdfFile(String sourceFileName, String destFileName, Map<String,Object> parameters, JRDataSource jrDataSource) throws JRException
JRException
runToPdfFile(String, String, Map, JRDataSource)
public static void runReportToPdfStream(InputStream inputStream, OutputStream outputStream, Map<String,Object> parameters, JRDataSource jrDataSource) throws JRException
JRException
runToPdfStream(InputStream, OutputStream, Map, JRDataSource)
public static byte[] runReportToPdf(String sourceFileName, Map<String,Object> parameters, JRDataSource jrDataSource) throws JRException
JRException
runToPdf(String, Map, JRDataSource)
public static byte[] runReportToPdf(InputStream inputStream, Map<String,Object> parameters, JRDataSource jrDataSource) throws JRException
JRException
runToPdf(InputStream, Map, JRDataSource)
public static byte[] runReportToPdf(JasperReport jasperReport, Map<String,Object> parameters, JRDataSource jrDataSource) throws JRException
JRException
runToPdf(JasperReport, Map, JRDataSource)
public static String runReportToHtmlFile(String sourceFileName, Map<String,Object> params, Connection conn) throws JRException
JRException
runToHtmlFile(String, Map, Connection)
public static String runReportToHtmlFile(String sourceFileName, Map<String,Object> params) throws JRException
JRException
runToHtmlFile(String, Map)
public static void runReportToHtmlFile(String sourceFileName, String destFileName, Map<String,Object> parameters, Connection conn) throws JRException
JRException
runToHtmlFile(String, String, Map, Connection)
public static void runReportToHtmlFile(String sourceFileName, String destFileName, Map<String,Object> parameters) throws JRException
JRException
runToHtmlFile(String, String, Map)
public static String runReportToHtmlFile(String sourceFileName, Map<String,Object> params, JRDataSource jrDataSource) throws JRException
JRException
runToHtmlFile(String, Map, JRDataSource)
public static void runReportToHtmlFile(String sourceFileName, String destFileName, Map<String,Object> parameters, JRDataSource jrDataSource) throws JRException
JRException
runToHtmlFile(String, String, Map, JRDataSource)
Copyright © 2017. All rights reserved.