net.sf.jasperreports.engine
Interface JRExporter

All Known Implementing Classes:
JExcelApiExporter, JExcelApiMetadataExporter, JRAbstractCsvExporter, JRAbstractExporter, JRCsvExporter, JRCsvMetadataExporter, JRDocxExporter, JRGraphics2DExporter, JRHtmlExporter, JROdsExporter, JROdtExporter, JROpenDocumentExporter, JRPdfExporter, JRPptxExporter, JRPrintServiceExporter, JRRtfExporter, JRTextExporter, JRXhtmlExporter, JRXlsAbstractExporter, JRXlsAbstractMetadataExporter, JRXlsExporter, JRXlsxExporter, JRXml4SwfExporter, JRXmlExporter

public interface JRExporter

All document exporting in JasperReports is done through this interface. There is an implementation of this interface for every document format that JasperReports supports at the moment.

Export customization is realized by using export parameters. Each exporter is able to recognize and use its own parameters, but there is a subset of predefined parameters that are common to all exporters. Those are identified by constants in the JRExporterParameter base class. All parameters are documented inside the classes where they are defined.

An important aspect is the output type of each exporter. There are three types of exporters depending on the type of output they produce:

All existing exporters fall into two categories depending on the way the content of the documents they produce could be structured:

Version:
$Id: JRExporter.java 5180 2012-03-29 13:23:12Z teodord $
Author:
Teodor Danciu (teodord@users.sourceforge.net)

Method Summary
 void exportReport()
          Actually starts the export process.
 java.lang.Object getParameter(JRExporterParameter parameter)
          Gets an export parameter.
 java.util.Map<JRExporterParameter,java.lang.Object> getParameters()
          Gets a map containing all export parameters.
 ReportContext getReportContext()
           
 void setParameter(JRExporterParameter parameter, java.lang.Object value)
          Sets an export parameter for advanced customization of the export process.
 void setParameters(java.util.Map<JRExporterParameter,java.lang.Object> parameters)
          Sets export parameters from a specified map.
 void setReportContext(ReportContext reportContext)
           
 

Method Detail

setParameter

void setParameter(JRExporterParameter parameter,
                  java.lang.Object value)
Sets an export parameter for advanced customization of the export process. Parameters can be either common parameters or specialized ones, depending on the exporter type.

Parameters:
parameter - the parameter, selected from the static parameters defined by JasperReports
value - the parameter value
See Also:
JRExporterParameter

getParameter

java.lang.Object getParameter(JRExporterParameter parameter)
Gets an export parameter.


setParameters

void setParameters(java.util.Map<JRExporterParameter,java.lang.Object> parameters)
Sets export parameters from a specified map.

See Also:
setParameter(JRExporterParameter, Object)

getParameters

java.util.Map<JRExporterParameter,java.lang.Object> getParameters()
Gets a map containing all export parameters.


setReportContext

void setReportContext(ReportContext reportContext)

getReportContext

ReportContext getReportContext()

exportReport

void exportReport()
                  throws JRException
Actually starts the export process.

Throws:
JRException


© 2001-2010 Jaspersoft Corporation www.jaspersoft.com