Class JRCsvExporter
java.lang.Object
net.sf.jasperreports.engine.JRAbstractExporter<CsvReportConfiguration,CsvExporterConfiguration,WriterExporterOutput,JRCsvExporterContext>
net.sf.jasperreports.engine.export.JRAbstractCsvExporter<CsvReportConfiguration,CsvExporterConfiguration,JRCsvExporterContext>
net.sf.jasperreports.engine.export.JRCsvExporter
- All Implemented Interfaces:
Exporter<ExporterInput,CsvReportConfiguration, CsvExporterConfiguration, WriterExporterOutput>
public class JRCsvExporter
extends JRAbstractCsvExporter<CsvReportConfiguration,CsvExporterConfiguration,JRCsvExporterContext>
Exports a JasperReports document to CSV format. It has character output type and exports the document to a
grid-based layout.
Because CSV is a data-oriented file format, exporting rich content documents to
CSV results in a tremendous loss of quality. The CSV exporter will completely ignore graphic elements present in
the source document that needs to be exported. It will only deal will text elements, and
from those, it will only extract the text value, completely ignoring the style properties.
CSV is a character-based file format whose content is structured in rows and columns, so
the
JRCsvExporter is a grid exporter
because it must transform the free-form content of
each page from the source document into a grid-like structure using the special grid layout algorithm.
By default, the CSV exporter uses commas to separate column values and newline
characters to separate rows in the resulting file. However, one can redefine the delimiters
using the two special exporter configuration settings in the
CsvExporterConfiguration class:
getFieldDelimiter()getRecordDelimiter()
-
which both provide
java.lang.String values.- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class net.sf.jasperreports.engine.JRAbstractExporter
JRAbstractExporter.BaseExporterContext, JRAbstractExporter.PageRange -
Field Summary
Fields inherited from class net.sf.jasperreports.engine.export.JRAbstractCsvExporter
BOM_CHARACTER, CSV_EXPORTER_KEY, CSV_EXPORTER_PROPERTIES_PREFIX, DEFAULT_ENCLOSURE, ESCAPE_FORMULA_CHARACTERS, escapeFormula, fieldDelimiter, forceFieldEnclosure, nature, pageIndex, quotes, recordDelimiter, writerFields inherited from class net.sf.jasperreports.engine.JRAbstractExporter
allSelector, crtCompositeConfiguration, crtCompositeItemConfiguration, crtItem, dateFormatCache, EXCEPTION_MESSAGE_KEY_EMPTY_INPUT_SOURCE_IN_BATCH_MODE, EXCEPTION_MESSAGE_KEY_END_PAGE_INDEX_OUT_OF_RANGE, EXCEPTION_MESSAGE_KEY_INVALID_IMAGE_NAME, EXCEPTION_MESSAGE_KEY_INVALID_ZOOM_RATIO, EXCEPTION_MESSAGE_KEY_NO_INPUT_SOURCE, EXCEPTION_MESSAGE_KEY_NO_OUTPUT_SPECIFIED, EXCEPTION_MESSAGE_KEY_OUTPUT_WRITER_ERROR, EXCEPTION_MESSAGE_KEY_PAGE_INDEX_OUT_OF_RANGE, EXCEPTION_MESSAGE_KEY_START_PAGE_INDEX_OUT_OF_RANGE, exporterConfiguration, exporterContext, exporterInput, exporterOutput, filter, fontUtil, hyperlinkProducerFactory, itemConfiguration, jasperPrint, jasperReportsContext, noBackcolorSelector, noneSelector, numberFormatCache, propertiesUtil, PROPERTY_DEFAULT_FILTER_FACTORY, PROPERTY_SUFFIX_DEFAULT_FILTER_FACTORY, rendererUtil, styledTextUtil, textValueClasses -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidexportPage(JRPrintPage page) protected Class<CsvExporterConfiguration> protected Class<CsvReportConfiguration> Methods inherited from class net.sf.jasperreports.engine.export.JRAbstractCsvExporter
exportReport, exportReportToWriter, getExporterKey, getExporterPropertiesPrefix, getStyledText, initExport, initReport, prepareTextMethods inherited from class net.sf.jasperreports.engine.JRAbstractExporter
checkInterrupted, createFilter, defaultParseNumber, ensureInput, ensureJasperReportsContext, ensureOutput, getBooleanCellValue, getCurrentConfiguration, getCurrentItemConfiguration, getCurrentJasperPrint, getDateCellValue, getDateFormat, getExporterConfiguration, getExporterContext, getExporterInput, getExporterOutput, getHyperlinkProducer, getJasperReportsContext, getLocale, getNumberCellValue, getNumberFormat, getOffsetX, getOffsetY, getPageRange, getPropertiesUtil, getRendererUtil, getReportContext, getReportExportConfiguration, getRepository, getStyledText, getTextFormatFactoryClass, getTextLocale, getTextTimeZone, getTextValue, getTextValueString, insideFrame, reset, resetExportContext, restoreElementOffsets, setConfiguration, setConfiguration, setCurrentExporterInputItem, setExporterInput, setExporterOutput, setFrameElementsOffset, setJasperReportsContext, setOffset, setOffset, setReportContext
-
Constructor Details
-
JRCsvExporter
public JRCsvExporter()- See Also:
-
JRCsvExporter
-
-
Method Details
-
getConfigurationInterface
-
getItemConfigurationInterface
-
exportPage
- Specified by:
exportPagein classJRAbstractCsvExporter<CsvReportConfiguration,CsvExporterConfiguration, JRCsvExporterContext> - Throws:
IOException
-