Interface Exporter<I extends ExporterInput,IC extends ReportExportConfiguration,C extends ExporterConfiguration,O extends ExporterOutput>

All Known Implementing Classes:
AbstractHtmlExporter, ExcelAbstractExporter, HtmlExporter, JRAbstractCsvExporter, JRAbstractExporter, JRCsvExporter, JRCsvMetadataExporter, JRDocxExporter, JRGraphics2DExporter, JROdsExporter, JROdtExporter, JRPdfExporter, JRPptxExporter, JRPrintServiceExporter, JRRtfExporter, JRTextExporter, JRXlsAbstractExporter, JRXlsAbstractMetadataExporter, JRXlsExporter, JRXlsMetadataExporter, JRXlsxExporter, JRXmlExporter, JsonExporter, JsonMetadataExporter, XlsxMetadataExporter

public interface Exporter<I extends ExporterInput,IC extends ReportExportConfiguration,C extends ExporterConfiguration,O extends ExporterOutput>
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 setting an ExporterConfiguration instance on the exporter and/or provide an instance of the same ExporterConfiguration interface for each item to be exported in batch mode using ExporterInputItem.getConfiguration().

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

  • exporters that export to text or character based file formats (HTML, RTF, CSV, TXT, XML exporters);
  • exporters that export to binary file formats (PDF and XLS exporters)
  • exporters that export directly to graphic devices (Graphics2D and Java Print Service exporters)

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

  • there are the exporters which target document formats which support free-form page content. These are the Grapchis2D, PDF, RTF and XML exporters.
  • the second category of exporters groups those exporters that target document formats which only support relative positioning of elements on a page or a grid-based layout. In this category we have the HTML, XLS and CSV exporters.
Author:
Teodor Danciu (teodord@users.sourceforge.net)
  • Method Details

    • setExporterInput

      void setExporterInput(I input)
      Provides the input for this exporter.
    • setExporterOutput

      void setExporterOutput(O output)
      Provides the output for this exporter.
    • setConfiguration

      void setConfiguration(IC configuration)
    • setConfiguration

      void setConfiguration(C configuration)
    • setReportContext

      void setReportContext(ReportContext reportContext)
    • getReportContext

      ReportContext getReportContext()
    • exportReport

      void exportReport() throws JRException
      Performs the export.
      Throws:
      JRException