net.sf.jasperreports.engine
Class JRExporterParameter

java.lang.Object
  extended by net.sf.jasperreports.engine.JRExporterParameter
Direct Known Subclasses:
JRCsvExporterParameter, JRDocxExporterParameter, JRGraphics2DExporterParameter, JRHtmlExporterParameter, JRPdfExporterParameter, JRPrintServiceExporterParameter, JRTextExporterParameter, JRXlsAbstractExporterParameter, JRXmlExporterParameter

public class JRExporterParameter
extends java.lang.Object

Instances of this class are used for defining and setting exporter parameters.

The JasperPrint object needed for the export can be specified in many ways: an instance of JasperPrint, an input stream, a file on disk, or an URL. The export engine will search for this object through parameters in the following order: JASPER_PRINT_LIST, JASPER_PRINT, INPUT_STREAM, INPUT_URL, INPUT_FILE, INPUT_FILE_NAME.

The output type of the export process can also vary: a string buffer, an output stream / writer of a file on disk. The order of parameters used by JasperReports when looking for the output depends on the final document format and is explained in detail for each format (see documentation for the children of this class).

JasperReports allows users to export only a page range from the entire report or even a single page. The engine first searches for the PAGE_INDEX parameter. If this is not present, it looks for the START_PAGE_INDEX and END_PAGE_INDEX parameters. The engine will try to narrow the page range (which is initially the entire report) by using these two parameters, if present.

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

Field Summary
static JRExporterParameter CHARACTER_ENCODING
          The character encoding used for export.
static JRExporterParameter CLASS_LOADER
          Deprecated. Replaced by JasperReportsContext.
static JRExporterParameter END_PAGE_INDEX
          An integer value representing the end index of the page range to be exported.
static JRExporterParameter FILE_RESOLVER
          Deprecated. Replaced by JasperReportsContext.
static JRExporterParameter FILTER
          Instance of the ExporterFilter interface to be used by the exporter to filter the elements to be exported.
static JRExporterParameter FONT_MAP
          Deprecated. Replaced by FontFamily.getExportFont(String).
static JRExporterParameter HYPERLINK_PRODUCER_FACTORY
          A JRHyperlinkProducerFactory which should be used for custom hyperlink types during export.
static JRExporterParameter IGNORE_PAGE_MARGINS
          Indicates whether page margins should be ignored when the report is exported using a grid-based exporter The type of the parameter is java.lang.Boolean.
static JRExporterParameter INPUT_FILE
          A java.io.File pointing to a file representing the serialized form of the JasperPrint object.
static JRExporterParameter INPUT_FILE_NAME
          A file representing the serialized form of the JasperPrint object.
static JRExporterParameter INPUT_STREAM
          The input stream that the exported JasperPrint object will be read from.
static JRExporterParameter INPUT_URL
          The URL that the JasperPrint object will be read from.
static JRExporterParameter JASPER_PRINT
          The JasperPrint object that will be exported.
static JRExporterParameter JASPER_PRINT_LIST
          A list of JasperPrint objects to be exported.
static JRExporterParameter OFFSET_X
          A parameter that allows users to move the entire content of each page horizontally.
static JRExporterParameter OFFSET_Y
          A parameter that allows users to move the entire content of each page vertically.
static JRExporterParameter OUTPUT_FILE
          The java.io.File instance that will be used to specify the file name of the exported report.
static JRExporterParameter OUTPUT_FILE_NAME
          The file name of the exported report.
static JRExporterParameter OUTPUT_STREAM
          The java.io.OutputStream instance that will be used to send the export output to.
static JRExporterParameter OUTPUT_STRING_BUFFER
          The string buffer to send the export output to.
static JRExporterParameter OUTPUT_WRITER
          The java.io.Writer instance that will be used to send the export output to.
static JRExporterParameter PAGE_INDEX
          An integer value representing the index of the page to be exported.
static JRExporterParameter PARAMETERS_OVERRIDE_REPORT_HINTS
          Export parameter that can override the PROPERTY_EXPORT_PARAMETERS_OVERRIDE_REPORT_HINTS property.
static JRExporterParameter PROGRESS_MONITOR
          A JRExportProgressMonitor instance for monitoring export status.
static java.lang.String PROPERTY_CHARACTER_ENCODING
          Property whose value is used as default for the CHARACTER_ENCODING export parameter.
static java.lang.String PROPERTY_EXPORT_PARAMETERS_OVERRIDE_REPORT_HINTS
          A (per system) property that establishes the priority of export parameters against report hints.
static java.lang.String PROPERTY_IGNORE_PAGE_MARGINS
          This property serves as default value for the IGNORE_PAGE_MARGINS export parameter.
static JRExporterParameter START_PAGE_INDEX
          An integer value representing the start index of the page range to be exported.
static JRExporterParameter URL_HANDLER_FACTORY
          Deprecated. Replaced by JasperReportsContext.
 
Constructor Summary
protected JRExporterParameter(java.lang.String name)
           
 
Method Summary
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

JASPER_PRINT

public static final JRExporterParameter JASPER_PRINT
The JasperPrint object that will be exported. If you already have a JasperPrint object, you can pass it to the export engine.


JASPER_PRINT_LIST

public static final JRExporterParameter JASPER_PRINT_LIST
A list of JasperPrint objects to be exported. If you need to concatenate several reports into the same document, you can use this feature.


INPUT_STREAM

public static final JRExporterParameter INPUT_STREAM
The input stream that the exported JasperPrint object will be read from. If you want to read the JasperPrint object from an input stream (like a web location), you can pass the stream to this parameter.


INPUT_URL

public static final JRExporterParameter INPUT_URL
The URL that the JasperPrint object will be read from. If the JasperPrint object is available as a web resource, you can use this parameter, instead of opening a HTTP connection and read from the input stream.


INPUT_FILE

public static final JRExporterParameter INPUT_FILE
A java.io.File pointing to a file representing the serialized form of the JasperPrint object. This is useful if the JasperPrint object is representing a file on disk.


INPUT_FILE_NAME

public static final JRExporterParameter INPUT_FILE_NAME
A file representing the serialized form of the JasperPrint object. You can use this parameter to specify a file name where the object can be found.


OUTPUT_STRING_BUFFER

public static final JRExporterParameter OUTPUT_STRING_BUFFER
The string buffer to send the export output to. Useful for just storing the result in a string for later use.


OUTPUT_WRITER

public static final JRExporterParameter OUTPUT_WRITER
The java.io.Writer instance that will be used to send the export output to. This is useful for sending the export result to a character stream, such as the PrintWriter of a servlet.


OUTPUT_STREAM

public static final JRExporterParameter OUTPUT_STREAM
The java.io.OutputStream instance that will be used to send the export output to. This is useful for sending the export result to an output stream, such as a ServletOutputStream.


OUTPUT_FILE

public static final JRExporterParameter OUTPUT_FILE
The java.io.File instance that will be used to specify the file name of the exported report. This is useful when exporting to a file and the File instance is already there.


OUTPUT_FILE_NAME

public static final JRExporterParameter OUTPUT_FILE_NAME
The file name of the exported report. This is an alternative to the OUTPUT_FILE parameter.


PAGE_INDEX

public static final JRExporterParameter PAGE_INDEX
An integer value representing the index of the page to be exported. This is useful when only one page of the entire report is needed for export.


START_PAGE_INDEX

public static final JRExporterParameter START_PAGE_INDEX
An integer value representing the start index of the page range to be exported. This is useful when only a range of pages is needed for export.


END_PAGE_INDEX

public static final JRExporterParameter END_PAGE_INDEX
An integer value representing the end index of the page range to be exported. This is useful when only a range of pages is needed for export.


CHARACTER_ENCODING

public static final JRExporterParameter CHARACTER_ENCODING
The character encoding used for export.


PROPERTY_CHARACTER_ENCODING

public static final java.lang.String PROPERTY_CHARACTER_ENCODING
Property whose value is used as default for the CHARACTER_ENCODING export parameter.

See Also:
JRPropertiesUtil, Constant Field Values

PROGRESS_MONITOR

public static final JRExporterParameter PROGRESS_MONITOR
A JRExportProgressMonitor instance for monitoring export status. This is useful for users who need to be notified after each page is exported (a GUI tool that shows a progress bar might need this feature).


OFFSET_X

public static final JRExporterParameter OFFSET_X
A parameter that allows users to move the entire content of each page horizontally. It is mostly useful for printing, when the report data does not fit inside the page margins.


OFFSET_Y

public static final JRExporterParameter OFFSET_Y
A parameter that allows users to move the entire content of each page vertically. It is mostly useful for printing, when the report data does not fit inside the page margins.


FONT_MAP

public static final JRExporterParameter FONT_MAP
Deprecated. Replaced by FontFamily.getExportFont(String).

CLASS_LOADER

public static final JRExporterParameter CLASS_LOADER
Deprecated. Replaced by JasperReportsContext.

URL_HANDLER_FACTORY

public static final JRExporterParameter URL_HANDLER_FACTORY
Deprecated. Replaced by JasperReportsContext.
URL stream handler factory to be used while exporting the report.

The values should be of type java.net.URLStreamHandlerFactory.

See Also:
JRResourcesUtil.createURL(String, java.net.URLStreamHandlerFactory)

FILE_RESOLVER

public static final JRExporterParameter FILE_RESOLVER
Deprecated. Replaced by JasperReportsContext.
The FileResolver instance to be used while exporting the report.


HYPERLINK_PRODUCER_FACTORY

public static final JRExporterParameter HYPERLINK_PRODUCER_FACTORY
A JRHyperlinkProducerFactory which should be used for custom hyperlink types during export.


FILTER

public static final JRExporterParameter FILTER
Instance of the ExporterFilter interface to be used by the exporter to filter the elements to be exported.


PROPERTY_EXPORT_PARAMETERS_OVERRIDE_REPORT_HINTS

public static final java.lang.String PROPERTY_EXPORT_PARAMETERS_OVERRIDE_REPORT_HINTS
A (per system) property that establishes the priority of export parameters against report hints. If the property is true, export parameters override report hints; this is the default behavior. This property cannot be used as a report export hint.

See Also:
Constant Field Values

PARAMETERS_OVERRIDE_REPORT_HINTS

public static final JRExporterParameter PARAMETERS_OVERRIDE_REPORT_HINTS
Export parameter that can override the PROPERTY_EXPORT_PARAMETERS_OVERRIDE_REPORT_HINTS property.


IGNORE_PAGE_MARGINS

public static final JRExporterParameter IGNORE_PAGE_MARGINS
Indicates whether page margins should be ignored when the report is exported using a grid-based exporter

The type of the parameter is java.lang.Boolean.

If set to true, any page in the document will be exported without taking into account its margins.

See Also:
PROPERTY_IGNORE_PAGE_MARGINS

PROPERTY_IGNORE_PAGE_MARGINS

public static final java.lang.String PROPERTY_IGNORE_PAGE_MARGINS
This property serves as default value for the IGNORE_PAGE_MARGINS export parameter.

The property itself defaults to false.

See Also:
JRPropertiesUtil, Constant Field Values
Constructor Detail

JRExporterParameter

protected JRExporterParameter(java.lang.String name)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


© 2001-2010 Jaspersoft Corporation www.jaspersoft.com