|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jasperreports.engine.JasperExportManager
public final class JasperExportManager
Fa�ade class for exporting generated reports into more popular formats such as PDF, HTML and XML. This class contains convenience methods for exporting to only these 3 formats.
For exporting to XLS and CSV format or for using special exporter parameters, the specific exporter class should be used directly.
JasperPrint
,
JRHtmlExporter
,
JRPdfExporter
,
JRXmlExporter
,
JRXlsExporter
,
JRCsvExporter
Method Summary | |
---|---|
static void |
exportReportToHtmlFile(JasperPrint jasperPrint,
java.lang.String destFileName)
|
static java.lang.String |
exportReportToHtmlFile(java.lang.String sourceFileName)
|
static void |
exportReportToHtmlFile(java.lang.String sourceFileName,
java.lang.String destFileName)
|
static byte[] |
exportReportToPdf(JasperPrint jasperPrint)
|
static void |
exportReportToPdfFile(JasperPrint jasperPrint,
java.lang.String destFileName)
|
static java.lang.String |
exportReportToPdfFile(java.lang.String sourceFileName)
|
static void |
exportReportToPdfFile(java.lang.String sourceFileName,
java.lang.String destFileName)
|
static void |
exportReportToPdfStream(java.io.InputStream inputStream,
java.io.OutputStream outputStream)
|
static void |
exportReportToPdfStream(JasperPrint jasperPrint,
java.io.OutputStream outputStream)
Exports the generated report object received as first parameter into PDF format and writes the results to the output stream specified by the second parameter. |
static java.lang.String |
exportReportToXml(JasperPrint jasperPrint)
|
static void |
exportReportToXmlFile(JasperPrint jasperPrint,
java.lang.String destFileName,
boolean isEmbeddingImages)
|
static java.lang.String |
exportReportToXmlFile(java.lang.String sourceFileName,
boolean isEmbeddingImages)
|
static void |
exportReportToXmlFile(java.lang.String sourceFileName,
java.lang.String destFileName,
boolean isEmbeddingImages)
|
static void |
exportReportToXmlStream(java.io.InputStream inputStream,
java.io.OutputStream outputStream)
|
static void |
exportReportToXmlStream(JasperPrint jasperPrint,
java.io.OutputStream outputStream)
|
void |
exportToHtmlFile(JasperPrint jasperPrint,
java.lang.String destFileName)
Exports the generated report object received as parameter into HTML format, placing the result into the second file parameter. |
java.lang.String |
exportToHtmlFile(java.lang.String sourceFileName)
Exports the generated report file specified by the parameter into HTML format. |
void |
exportToHtmlFile(java.lang.String sourceFileName,
java.lang.String destFileName)
Exports the generated report file specified by the first parameter into HTML format, placing the result into the second file parameter. |
byte[] |
exportToPdf(JasperPrint jasperPrint)
Exports the generated report object received as parameter into PDF format and returns the binary content as a byte array. |
void |
exportToPdfFile(JasperPrint jasperPrint,
java.lang.String destFileName)
Exports the generated report file specified by the first parameter into PDF format, the result being placed in the second file parameter. |
java.lang.String |
exportToPdfFile(java.lang.String sourceFileName)
Exports the generated report file specified by the parameter into PDF format. |
void |
exportToPdfFile(java.lang.String sourceFileName,
java.lang.String destFileName)
Exports the generated report file specified by the first parameter into PDF format, the result being placed in the second file parameter. |
void |
exportToPdfStream(java.io.InputStream inputStream,
java.io.OutputStream outputStream)
Exports the generated report read from the supplied input stream into PDF format and writes the results to the output stream specified by the second parameter. |
void |
exportToPdfStream(JasperPrint jasperPrint,
java.io.OutputStream outputStream)
Exports the generated report object received as first parameter into PDF format and writes the results to the output stream specified by the second parameter. |
java.lang.String |
exportToXml(JasperPrint jasperPrint)
Exports the generated report object supplied as parameter into XML format and returs the result as String. |
void |
exportToXmlFile(JasperPrint jasperPrint,
java.lang.String destFileName,
boolean isEmbeddingImages)
Exports the generated report object received as parameter into XML format, placing the result into the second file parameter. |
java.lang.String |
exportToXmlFile(java.lang.String sourceFileName,
boolean isEmbeddingImages)
Exports the generated report file specified by the parameter into XML format. |
void |
exportToXmlFile(java.lang.String sourceFileName,
java.lang.String destFileName,
boolean isEmbeddingImages)
Exports the generated report file specified by the first parameter into XML format, placing the result into the second file parameter. |
void |
exportToXmlStream(java.io.InputStream inputStream,
java.io.OutputStream outputStream)
Exports the generated report object read from the supplied input stream into XML format, and writes the result to the output stream specified by the second parameter. |
void |
exportToXmlStream(JasperPrint jasperPrint,
java.io.OutputStream outputStream)
Exports the generated report object supplied as the first parameter into XML format, and writes the result to the output stream specified by the second parameter. |
static JasperExportManager |
getInstance(JasperReportsContext jasperReportsContext)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static JasperExportManager getInstance(JasperReportsContext jasperReportsContext)
public java.lang.String exportToPdfFile(java.lang.String sourceFileName) throws JRException
*.pdf
extension and it is located in the same directory as the source file.
sourceFileName
- source file containing the generated report
JRException
JRPdfExporter
public void exportToPdfFile(java.lang.String sourceFileName, java.lang.String destFileName) throws JRException
sourceFileName
- source file containing the generated reportdestFileName
- file name to place the PDF content into
JRException
JRPdfExporter
public void exportToPdfFile(JasperPrint jasperPrint, java.lang.String destFileName) throws JRException
jasperPrint
- report object to exportdestFileName
- file name to place the PDF content into
JRException
JRPdfExporter
public void exportToPdfStream(java.io.InputStream inputStream, java.io.OutputStream outputStream) throws JRException
inputStream
- input stream to read the generated report object fromoutputStream
- output stream to write the resulting PDF content to
JRException
JRPdfExporter
public void exportToPdfStream(JasperPrint jasperPrint, java.io.OutputStream outputStream) throws JRException
jasperPrint
- report object to exportoutputStream
- output stream to write the resulting PDF content to
JRException
JRPdfExporter
public byte[] exportToPdf(JasperPrint jasperPrint) throws JRException
jasperPrint
- report object to export
JRException
JRPdfExporter
public java.lang.String exportToXmlFile(java.lang.String sourceFileName, boolean isEmbeddingImages) throws JRException
*.jrpxml
extension and it is located in the same directory as the source file.
When exporting to XML format, the images can be either embedded in the XML content itself using the Base64 encoder or be referenced as external resources. If not embedded, the images are placed as distinct files inside a directory having the same name as the XML destination file, plus the "_files" suffix.
sourceFileName
- source file containing the generated reportisEmbeddingImages
- flag that indicates whether the images should be embedded in the
XML content itself using the Base64 encoder or be referenced as external resources
JRException
JRPdfExporter
public void exportToXmlFile(java.lang.String sourceFileName, java.lang.String destFileName, boolean isEmbeddingImages) throws JRException
If not embedded into the XML content itself using the Base64 encoder, the images are placed as distinct files inside a directory having the same name as the XML destination file, plus the "_files" suffix.
sourceFileName
- source file containing the generated reportdestFileName
- file name to place the XML representation intoisEmbeddingImages
- flag that indicates whether the images should be embedded in the
XML content itself using the Base64 encoder or be referenced as external resources
JRException
JRPdfExporter
public void exportToXmlFile(JasperPrint jasperPrint, java.lang.String destFileName, boolean isEmbeddingImages) throws JRException
If not embedded into the XML content itself using the Base64 encoder, the images are placed as distinct files inside a directory having the same name as the XML destination file, plus the "_files" suffix.
jasperPrint
- report object to exportdestFileName
- file name to place the XML representation intoisEmbeddingImages
- flag that indicates whether the images should be embedded in the
XML content itself using the Base64 encoder or be referenced as external resources
JRException
JRPdfExporter
public void exportToXmlStream(java.io.InputStream inputStream, java.io.OutputStream outputStream) throws JRException
inputStream
- input stream to read the generated report object fromoutputStream
- output stream to write the resulting XML representation to
JRException
JRPdfExporter
public void exportToXmlStream(JasperPrint jasperPrint, java.io.OutputStream outputStream) throws JRException
jasperPrint
- report object to exportoutputStream
- output stream to write the resulting XML representation to
JRException
JRPdfExporter
public java.lang.String exportToXml(JasperPrint jasperPrint) throws JRException
jasperPrint
- report object to export
JRException
JRPdfExporter
public java.lang.String exportToHtmlFile(java.lang.String sourceFileName) throws JRException
*.html
extension and it is located in the same directory as the source file.
The images are placed as distinct files inside a directory having the same name
as the HTML destination file, plus the "_files" suffix.
sourceFileName
- source file containing the generated report
JRException
JRHtmlExporter
public void exportToHtmlFile(java.lang.String sourceFileName, java.lang.String destFileName) throws JRException
The images are placed as distinct files inside a directory having the same name as the HTML destination file, plus the "_files" suffix.
sourceFileName
- source file containing the generated reportdestFileName
- file name to place the HTML content into
JRException
JRPdfExporter
public void exportToHtmlFile(JasperPrint jasperPrint, java.lang.String destFileName) throws JRException
The images are placed as distinct files inside a directory having the same name as the HTML destination file, plus the "_files" suffix.
jasperPrint
- report object to exportdestFileName
- file name to place the HTML content into
JRException
JRPdfExporter
public static java.lang.String exportReportToPdfFile(java.lang.String sourceFileName) throws JRException
JRException
exportToPdfFile(String)
public static void exportReportToPdfFile(java.lang.String sourceFileName, java.lang.String destFileName) throws JRException
JRException
exportToPdfFile(String, String)
public static void exportReportToPdfFile(JasperPrint jasperPrint, java.lang.String destFileName) throws JRException
JRException
exportToPdfFile(JasperPrint, String)
public static void exportReportToPdfStream(java.io.InputStream inputStream, java.io.OutputStream outputStream) throws JRException
JRException
exportToPdfStream(InputStream, OutputStream)
public static void exportReportToPdfStream(JasperPrint jasperPrint, java.io.OutputStream outputStream) throws JRException
jasperPrint
- report object to exportoutputStream
- output stream to write the resulting PDF content to
JRException
JRPdfExporter
,
exportToPdfStream(JasperPrint, OutputStream)
public static byte[] exportReportToPdf(JasperPrint jasperPrint) throws JRException
JRException
exportToPdf(JasperPrint)
public static java.lang.String exportReportToXmlFile(java.lang.String sourceFileName, boolean isEmbeddingImages) throws JRException
JRException
exportToXmlFile(String, String, boolean)
public static void exportReportToXmlFile(java.lang.String sourceFileName, java.lang.String destFileName, boolean isEmbeddingImages) throws JRException
JRException
exportToXmlFile(String, String, boolean)
public static void exportReportToXmlFile(JasperPrint jasperPrint, java.lang.String destFileName, boolean isEmbeddingImages) throws JRException
JRException
exportToXmlFile(JasperPrint, String, boolean)
public static void exportReportToXmlStream(java.io.InputStream inputStream, java.io.OutputStream outputStream) throws JRException
JRException
exportToXmlStream(InputStream, OutputStream)
public static void exportReportToXmlStream(JasperPrint jasperPrint, java.io.OutputStream outputStream) throws JRException
JRException
exportToXmlStream(JasperPrint, OutputStream)
public static java.lang.String exportReportToXml(JasperPrint jasperPrint) throws JRException
JRException
exportToXml(JasperPrint)
public static java.lang.String exportReportToHtmlFile(java.lang.String sourceFileName) throws JRException
JRException
exportToHtmlFile(String)
public static void exportReportToHtmlFile(java.lang.String sourceFileName, java.lang.String destFileName) throws JRException
JRException
exportToHtmlFile(String, String)
public static void exportReportToHtmlFile(JasperPrint jasperPrint, java.lang.String destFileName) throws JRException
JRException
exportToHtmlFile(JasperPrint, String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |