com.aspose.words.jasperreports
Class AWExporterParameter

java.lang.Object
  extended by net.sf.jasperreports.engine.JRExporterParameter
      extended by com.aspose.words.jasperreports.AWExporterParameter

public class AWExporterParameter
extends net.sf.jasperreports.engine.JRExporterParameter

Contains various export parameters used to configure the export.

The following code sample demonstrates the usage of the class:

 AWDocExporter exporter = new AWDocExporter();

 exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
 exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, destFile.toString());

 exporter.setParameter(
     AWExporterParameter.OVERLAP_RESOLUTION_METHOD,
     AWExporterParameter.OVERLAP_RESOLUTION_METHOD_TRUNCATE_ITEMS);

 exporter.exportReport();
 


Field Summary
static AWExporterParameter EXPORT_EMPTY_TEXTS
          Parameter to determine whether to export or not empty texts.
static AWExporterParameter EXPORT_LINES
          Parameter to determine whether to export lines.
static AWExporterParameter EXPORT_RECTANGLES
          Parameter to determine whether to export rectangles.
static AWExporterParameter EXPORT_RECTANGLES_AS_FRAMES
          Parameter to determine whether to export rectangles as frames.
static AWExporterParameter EXPORT_REPEATING_ELEMENTS
           
static AWExporterParameter LICENSE
          Parameter to set the path to a license file.
static AWExporterParameter MOVE_ELEMENTS_TO_FRAMES
          Parameter to determine whether to move elements to frames.
static AWExporterParameter OVERLAP_RESOLUTION_METHOD
          Parameter to determine a way to resolve overlapping items.
static int OVERLAP_RESOLUTION_METHOD_AS_IS
          Specifies the AsIs Items resolution method.
static int OVERLAP_RESOLUTION_METHOD_PUSH_ITEMS
          Specifies the Push Items resolution method.
static int OVERLAP_RESOLUTION_METHOD_TRUNCATE_ITEMS
          Specifies the Truncate Items resolution method.
static AWExporterParameter PAGE_BREAKS
          Parameter set the way page breaks are inserted into the document.
static int PAGE_BREAKS_NONE
          Specifies that no page breaks will be inserted into the document.
static int PAGE_BREAKS_NORMAL
          Specifies that normal (not section) page breaks will be inserted into the document.
static int PAGE_BREAKS_SECTIONS
          Specifies that section breaks will be inserted into the document.
static AWExporterParameter PAGE_MARGINS
          Parameter to enforce page margins.
static AWExporterParameter POSITIONED_STYLE
           
static java.lang.String PROPERTY_EXPORT_EMPTY_TEXTS
          This constant is not supposed to be used directly.
static java.lang.String PROPERTY_EXPORT_LINES
          This constant is not supposed to be used directly.
static java.lang.String PROPERTY_EXPORT_RECTANGLES
          This constant is not supposed to be used directly.
static java.lang.String PROPERTY_EXPORT_RECTANGLES_AS_FRAMES
          This constant is not supposed to be used directly.
static java.lang.String PROPERTY_EXPORT_REPEATING_ELEMENTS
          This constant is not supposed to be used directly.
static java.lang.String PROPERTY_LICENSE
          This constant is not supposed to be used directly.
static java.lang.String PROPERTY_MOVE_ELEMENTS_TO_FRAMES
          This constant is not supposed to be used directly.
static java.lang.String PROPERTY_OVERLAP_RESOLUTION_METHOD
          This constant is not supposed to be used directly.
static java.lang.String PROPERTY_PAGE_BREAKS
          This constant is not supposed to be used directly.
static java.lang.String PROPERTY_PAGE_MARGINS
          This constant is not supposed to be used directly.
static java.lang.String PROPERTY_POSITIONED_STYLE
          This constant is not supposed to be used directly.
static java.lang.String PROPERTY_RECOGNIZE_FIELDS
          This constant is not supposed to be used directly.
static java.lang.String PROPERTY_SPACING_FACTOR
          This constant is not supposed to be used directly.
static java.lang.String PROPERTY_TEST_MODE
          This constant is not supposed to be used directly.
static java.lang.String PROPERTY_USE_EXACT_ROW_HEIGHTS
          This constant is not supposed to be used directly.
static java.lang.String PROPERTY_USE_EXACT_SPACINGS
          This constant is not supposed to be used directly.
static AWExporterParameter RECOGNIZE_FIELDS
          Parameter to control whether the text enclosed in curve brackets ({}) should be exported as Microsoft Word fields.
static AWExporterParameter SPACING_FACTOR
          Parameter to reduce spacing between report elements if needed.
static AWExporterParameter TEST_MODE
           
static AWExporterParameter USE_EXACT_ROW_HEIGHTS
          Parameter to determine whether to set exact row heights (for example in tables).
static AWExporterParameter USE_EXACT_SPACINGS
          Parameter to determine whether to set exact spacings (for example in headings).
 
Fields inherited from class net.sf.jasperreports.engine.JRExporterParameter
CHARACTER_ENCODING, CLASS_LOADER, END_PAGE_INDEX, FILE_RESOLVER, FILTER, FONT_MAP, HYPERLINK_PRODUCER_FACTORY, IGNORE_PAGE_MARGINS, INPUT_FILE, INPUT_FILE_NAME, INPUT_STREAM, INPUT_URL, JASPER_PRINT, JASPER_PRINT_LIST, OFFSET_X, OFFSET_Y, OUTPUT_FILE, OUTPUT_FILE_NAME, OUTPUT_STREAM, OUTPUT_STRING_BUFFER, OUTPUT_WRITER, PAGE_INDEX, PARAMETERS_OVERRIDE_REPORT_HINTS, PROGRESS_MONITOR, PROPERTY_CHARACTER_ENCODING, PROPERTY_EXPORT_PARAMETERS_OVERRIDE_REPORT_HINTS, PROPERTY_IGNORE_PAGE_MARGINS, START_PAGE_INDEX, URL_HANDLER_FACTORY
 
Method Summary
 
Methods inherited from class net.sf.jasperreports.engine.JRExporterParameter
toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LICENSE

public static final AWExporterParameter LICENSE
Parameter to set the path to a license file.


PROPERTY_LICENSE

public static final java.lang.String PROPERTY_LICENSE
This constant is not supposed to be used directly.

See Also:
Constant Field Values

OVERLAP_RESOLUTION_METHOD

public static final AWExporterParameter OVERLAP_RESOLUTION_METHOD
Parameter to determine a way to resolve overlapping items.

JasperReports reports can contain overlapping items. Faithfully converting reports with overlapping items to Microsoft Word documents can sometimes represent challenges to the system. In Flow Layout, overlapping items cannot be converted preserving their original location or size because there is no such thing as Z-order in Flow Layout. However, Aspose.Words for JasperReports tries to export such items as close to the original as possible. It offers two methods of resolving overlapping items:

The first method is used by default as it allows the preservation of the original position of report items and does not affect surrounding contents. However, it may corrupt the item's appearance. If you are not satisfied with the Truncate method, you can try the Push method.


PROPERTY_OVERLAP_RESOLUTION_METHOD

public static final java.lang.String PROPERTY_OVERLAP_RESOLUTION_METHOD
This constant is not supposed to be used directly.

See Also:
Constant Field Values

OVERLAP_RESOLUTION_METHOD_AS_IS

public static final int OVERLAP_RESOLUTION_METHOD_AS_IS
Specifies the AsIs Items resolution method.

See Also:
Constant Field Values

OVERLAP_RESOLUTION_METHOD_PUSH_ITEMS

public static final int OVERLAP_RESOLUTION_METHOD_PUSH_ITEMS
Specifies the Push Items resolution method.

See Also:
Constant Field Values

OVERLAP_RESOLUTION_METHOD_TRUNCATE_ITEMS

public static final int OVERLAP_RESOLUTION_METHOD_TRUNCATE_ITEMS
Specifies the Truncate Items resolution method.

See Also:
Constant Field Values

EXPORT_LINES

public static final AWExporterParameter EXPORT_LINES
Parameter to determine whether to export lines. By default, the value of the parameter is false.

Lines in JasperReports are often used to represent borders and other decorative elements around text. At the moment Aspose.Words for JasperReports exports reports to flow layout documents, which means they consist of "normal" inline paragraphs and tables. Flow layout does not support overlapping items and Z-order at all. Exporting lines that are placed over other items would corrupt the resulting appearance of the document.

If you need lines to be exported, set this parameter to true.


PROPERTY_EXPORT_LINES

public static final java.lang.String PROPERTY_EXPORT_LINES
This constant is not supposed to be used directly.

See Also:
Constant Field Values

EXPORT_RECTANGLES

public static final AWExporterParameter EXPORT_RECTANGLES
Parameter to determine whether to export rectangles. By default, the value of the parameter is true.

Rectangles in JasperReports are often used to represent borders and other decorative elements around text. At the moment Aspose.Words for JasperReports exports reports to flow layout documents, which means they consist of "normal" inline paragraphs and tables. Flow layout does not support overlapping items and Z-order at all. Exporting rectangles that are placed over other items would corrupt the resulting appearance of the document.

If you do not need rectangles to be exported, set this parameter to false.


PROPERTY_EXPORT_RECTANGLES

public static final java.lang.String PROPERTY_EXPORT_RECTANGLES
This constant is not supposed to be used directly.

See Also:
Constant Field Values

EXPORT_RECTANGLES_AS_FRAMES

public static final AWExporterParameter EXPORT_RECTANGLES_AS_FRAMES
Parameter to determine whether to export rectangles as frames. By default, the value of the parameter is true.

Rectangles in JasperReports are often used to represent borders and other decorative elements around text. At the moment Aspose.Words for JasperReports exports reports to flow layout documents, which means they consist of "normal" inline paragraphs and tables. Flow layout does not support overlapping items and Z-order at all. Exporting rectangles that are placed over other items would corrupt the resulting appearance of the document.

If you do not need rectangles to be exported as frames, set this parameter to false.


PROPERTY_EXPORT_RECTANGLES_AS_FRAMES

public static final java.lang.String PROPERTY_EXPORT_RECTANGLES_AS_FRAMES
This constant is not supposed to be used directly.

See Also:
Constant Field Values

MOVE_ELEMENTS_TO_FRAMES

public static final AWExporterParameter MOVE_ELEMENTS_TO_FRAMES
Parameter to determine whether to move elements to frames. By default, the value of the parameter is true.

Input will be analyzed for elements overlapped with frames and those elements will be moved inside appropriate frame

If you do not need to move elements to frames, set this parameter to false.


PROPERTY_MOVE_ELEMENTS_TO_FRAMES

public static final java.lang.String PROPERTY_MOVE_ELEMENTS_TO_FRAMES
This constant is not supposed to be used directly.

See Also:
Constant Field Values

USE_EXACT_ROW_HEIGHTS

public static final AWExporterParameter USE_EXACT_ROW_HEIGHTS
Parameter to determine whether to set exact row heights (for example in tables). By default, the value of the parameter is true.

This will allow to use row heights that EXACTLY equals to those from input, otherwise will be used AT_LEAST row heights

If you do not need to set exact row heights, set this parameter to false.


PROPERTY_USE_EXACT_ROW_HEIGHTS

public static final java.lang.String PROPERTY_USE_EXACT_ROW_HEIGHTS
This constant is not supposed to be used directly.

See Also:
Constant Field Values

USE_EXACT_SPACINGS

public static final AWExporterParameter USE_EXACT_SPACINGS
Parameter to determine whether to set exact spacings (for example in headings). By default, the value of the parameter is false.

This will allow to use spacings that exactly the same as from input, otherwise some optimized spacings will be used

If you need to set exact spacings, set this parameter to true.


PROPERTY_USE_EXACT_SPACINGS

public static final java.lang.String PROPERTY_USE_EXACT_SPACINGS
This constant is not supposed to be used directly.

See Also:
Constant Field Values

EXPORT_EMPTY_TEXTS

public static final AWExporterParameter EXPORT_EMPTY_TEXTS
Parameter to determine whether to export or not empty texts. By default, the value of the parameter is true.

This will allow to enable/disable exporting of empty texts

If you do not need to export empty texts, set this parameter to false.


PROPERTY_EXPORT_EMPTY_TEXTS

public static final java.lang.String PROPERTY_EXPORT_EMPTY_TEXTS
This constant is not supposed to be used directly.

See Also:
Constant Field Values

SPACING_FACTOR

public static final AWExporterParameter SPACING_FACTOR
Parameter to reduce spacing between report elements if needed. By default, the value of the parameter is 1.0.

When generating documents in flow mode, it is impossible to set the coordinates of report elements explicitly. This means that sometimes page contents may appear higher than designed and therefore be pushed to the following page. To eliminate this side effect, you may reduce spacing between report elements. If you encounter the described behaviour (the documnet contains more pages than expected), try setting the SPACING_FACTOR parameter to a value less than 1.0. Keep decreasing the value until all page contents fit corresponding pages.


PROPERTY_SPACING_FACTOR

public static final java.lang.String PROPERTY_SPACING_FACTOR
This constant is not supposed to be used directly.

See Also:
Constant Field Values

PAGE_MARGINS

public static final AWExporterParameter PAGE_MARGINS
Parameter to enforce page margins.

Unfortunately, at the moment JasperReports print model does not allow exporters detect page margins specified in the report design. Hence, Aspose.Words for JasperReports uses a special algorithm to work this around.

The algorithm works as follows. All page margins are set to a default value that is used by Microsoft Word when creating a new document (1 inch). If some report elements are located closer to page edges, then the corresponding page margins are reduced appropriately. That is, page margins are set to the value of 1in or less, depending on report design.

You can change the default 1in value by specifying what page margins the exporter should try to enforce. The value of the parameter is a string of the form

"left_margin;right_margin;top_margin;bottom_margin",

where the following units of measure are allowed:

Note you can use different units of measure in the same string or omit some of margin values.


PROPERTY_PAGE_MARGINS

public static final java.lang.String PROPERTY_PAGE_MARGINS
This constant is not supposed to be used directly.

See Also:
Constant Field Values

PAGE_BREAKS

public static final AWExporterParameter PAGE_BREAKS
Parameter set the way page breaks are inserted into the document.

Aspose.Words for JasperReports supports three ways page breaks are inserted between document pages:

The "section breaks" mode is chosen as default because there may be headers and footers throughout the document that contain different data. Microsoft Word requires different headers/footers should be placed in different sections.

Note that in the "normal" and "no page breaks" modes, since the generated document consists of one section, only first pair of header and footer will be exported.


PROPERTY_PAGE_BREAKS

public static final java.lang.String PROPERTY_PAGE_BREAKS
This constant is not supposed to be used directly.

See Also:
Constant Field Values

PAGE_BREAKS_NORMAL

public static final int PAGE_BREAKS_NORMAL
Specifies that normal (not section) page breaks will be inserted into the document.

See Also:
Constant Field Values

PAGE_BREAKS_SECTIONS

public static final int PAGE_BREAKS_SECTIONS
Specifies that section breaks will be inserted into the document.

See Also:
Constant Field Values

PAGE_BREAKS_NONE

public static final int PAGE_BREAKS_NONE
Specifies that no page breaks will be inserted into the document.

See Also:
Constant Field Values

RECOGNIZE_FIELDS

public static final AWExporterParameter RECOGNIZE_FIELDS
Parameter to control whether the text enclosed in curve brackets ({}) should be exported as Microsoft Word fields.

Aspose.Words for JasperReports provides a unique feature that allows inserting Microsoft Word fields to any point of the document. This can be used to insert page numbers that are dynamically updated as the document is being edited, TOC (table of contents), and many other things.

Once this parameter is set to true, the exporter treats any text enclosed in curve brackets ({}) as a field code and exports it appropriately. For example, the following text

Page { PAGE } of { NUMPAGES },

will contain two fields in the produced document, PAGE and NUMPAGES, whose are calculated to the current page number and the total number of pages in the document, respectively.

You can add any field arguments and switches supported by the field. For example, to insert a timestamp of document creation, insert the following text:

{ DOCPROPERTY CreateTime }


PROPERTY_RECOGNIZE_FIELDS

public static final java.lang.String PROPERTY_RECOGNIZE_FIELDS
This constant is not supposed to be used directly.

See Also:
Constant Field Values

POSITIONED_STYLE

public static final AWExporterParameter POSITIONED_STYLE

PROPERTY_POSITIONED_STYLE

public static final java.lang.String PROPERTY_POSITIONED_STYLE
This constant is not supposed to be used directly.

See Also:
Constant Field Values

EXPORT_REPEATING_ELEMENTS

public static final AWExporterParameter EXPORT_REPEATING_ELEMENTS

PROPERTY_EXPORT_REPEATING_ELEMENTS

public static final java.lang.String PROPERTY_EXPORT_REPEATING_ELEMENTS
This constant is not supposed to be used directly.

See Also:
Constant Field Values

TEST_MODE

public static final AWExporterParameter TEST_MODE

PROPERTY_TEST_MODE

public static final java.lang.String PROPERTY_TEST_MODE
This constant is not supposed to be used directly.

See Also:
Constant Field Values