Windward OhanaJava Report Engine User Manual ReferenceJava Report Engine WindwardReports.properties Properties

Java Report Engine WindwardReports.properties Properties

This article describes the optional properties that can be placed in your Java Report Engine application's WindwardReports.properties file.

Finding the WindwardReports.properties File

Set the location of the WindwardReports.properties file by calling

System.setProperty("WindwardReports.properties.filename", the fully qualified filename); 

before calling any Java Report Engine API.

When Java Report Engine starts, it makes a call to:

System.getProperty("WindwardReports.properties.filename", "WindwardReports.properties");

It then tries to resolve that filename by trying in order:

  1. Thread.currentThread().getContextClassLoader().getResource();
  2. ProcessReport.class.getClassLoader().getResource();
  3. ClassLoader.getSystemResource();
  4. new File();
  5. new URL();

With the resolved resource name from the above steps, it then tries in order:

  1. Thread.currentThread().getContextClassLoader().getResourceAsStream();
  2. ProcessReport.class.getClassLoader().getResourceAsStream();
  3. ClassLoader.getSystemResource().openConnection().getInputStream();
  4. new FileInputStream();
  5. new URL().openConnection().getInputStream();

The properties below can be set as any other Java property. Usually you will create a WindwardReports.properties file and point to it.

Properties Categories

The below property settings fall into three general categories:

  1. Read in and set when the Report Engine starts. You need to restart the Report Engine for new values to be read and used. These properties are categorized as Global.
  2. Read in and used every time a output is generated from a Report Template. When these are changed, the next report will use the new settings. These properties are categorized as Local.
  3. Default values for properties you can set in a (Process)Report object. When you change these the next instantiation of the report object will use those new values as the defaults. You can then explicitly set these properties in the object. These properties are categorized as Report.
  4. Other properties that don't fall into the above categories are categorized as Miscellaneous.

Use these links to jump forward to a properties category:

Global Properties

Local Properties

Report Properties

Miscellaneous Properties

Global Properties

Name Allowed Values Default Description
asian.support
true, false
true
If set to false then the server assumes the files needed for output of Asian text is not available and will fall-back to Latin text only
default.chart.dpi
any number
300
When charts are rendered to a bitmap (for printers), they are rendered at this resolution.
default.image.dpi
any number
96
If a bitmap does not have it's DPI set, this is the value used.
expand.out.text
ignore, newline, paragraph
paragraph
What to do if an Out Tag has a <CR> and/or <TAB> in the text. <TAB> is handled for both newline and paragraph. newline is a line break (like <br/> in html) and paragraph is a paragraph break.
font.files fontname;fontname;…
none

Example: c:/windows/fonts/*.ttf;c:/windows/fonts/*.ttc;


A series of paths, separated by semicolons, to where the true type fonts are on the system. The only wildcard recognized is the * (i.e. no regular expressions). The Report Engine will look in the usual directories on Windows and Linux; this setting is just for non-standard locations to also be read in.

font.map
font_replace1=font_subst1;…
none

Arial=Courier New;Times New Roman=Verdana

Map use of one font to another. In the example above any use of Arial in the generated output will instead use Courier New. Any use of Times New Roman will instead use Verdana. Very useful when a template uses fonts that do not exist on the system the Report Engine is running on.


force.bitmap.format
bmp, gif, jpeg, png and tiff
none This will force all bitmaps in the created report to be converted to the requested format. The default is no conversion.
ignore.tag.colors
true, false
false
Set to true to not remove foreground colors from Tags if the color of the Tag in the template matches the Tag's assigned color.
layout.document
on, off
on
If set to off, then for output we do not have to layout (DOCX, XLSX, PPTX, HTML in non-pages mode), the engine will not perform layout in the generated output. In this case the ProcessReport.getNumPages() will return an undefined value (usually 0) and any fields in DOCX that depend on page, section, num pages, etc. numbers will be wrong and the fields will need to be updated. The advantage of turning this off is document production will be faster. This setting is ignored for formats we need to layout (PDF, printer, text, etc.)
license
a valid Windward license
none
This is required – it is your license to run the program. It is a uuencoded string and can be in a single line or in multiple lines with each line (except the last one) ending with a "\" (backslash).
logging.filename
off, a_log4j_properties_filename
none
The location of your log4j properties file. If you use log4j for your application, put the properties file location here. The value of off means you are not using log4j. There is no need to set this if log4j is initialized before Windward Reports is called.
odata.max-message-size
any number
10000000
Set the maximum message size in the OData provider.
pdf.font_mapping auto or postscriptFontname1=displayFontname1;…
none
Can be set to auto or ArialMT=Arial;Arial-BoldMT=Arial,Bold; auto will set the font names to the name specified in the template, overwriting the true postscript name. The series of "postscriptName=FinalName;" is an explicit mapping and you can have as many as you wish.
pdf.makeLineToFit
true, false
true
Set to true to force PDF text to fit within its measured (when the Engine determined layout) length. Set to false to have the text take the width Acrobat calculates.
pdf.rgbTransparencyBlendingSpace
true, false
false
Set to false to use the RGB space for image color blending in the PDF.
system.locale
any locale such as de or de_CH
the system locale
Set the locale for system messages.

Local Properties

Name Allowed Values Default Description
check.for.glyphs
on, off
on
Checks the font specified for text and changes the font if it does not have glyphs for some of the text.
check.for.glyphs.fontnames
font name 1;font name 2;…
MS Mincho;Arial Unicode MS
The list of fonts to consider when the specified font does not have the glyphs needed. The font with the largest number of needed glyphs is used. If there is a tie, the earliest one in the list is used.
check.for.ole.images
true, false
true
If true the Engine will check all images brought in via an Out Tag for an OLE header (used in Northwind and Access databases) and will strip it off. This has no effect on non-OLE images.
html.embed_images
true, false
false
Set to true to embed images in an HTML output file. Set to false to produce separate image files.
html.split_pages true, false
false
Set to true to produce multiple output files, one html file per document page. Set to false to create one continuous HTML page.
line.break
internal, external
internal
Set to internal to use the Engine's internal line breaker. Set to external to use the Java runtime line breaker. The Windows default is external; the default for other operating systems is internal. Use internal for hyphenation, small caps, font scaling, and font spacing for PDF and printer output.
report.hyphenate 0, 1 or 2
1 Control how output is hyphenated: 0 - do not hyphenate; 1 - hyphenate if auto-hyphenate set in template; 2 - hyphenate.
report.remove-unused-formats true, false
false
Set to true to remove unused formats (Word only).
report.timeout any number greater than 0 (seconds)
none
If a report takes longer than this time to generate, it will throw an exception. This is not checked to the second. The Engine checks about every 15 seconds or so to see if it’s passed the timeout. So a timeout of 30 seconds may not throw an exception until 45 seconds.
report.trim
none, end.whitespace, and end.blank
none
Set this to trim white space at the end of a report. end.whitespace will remove empty paragraphs and section breaks. end.blank will also remove blank text.
report.write-fields-as-fields true, false
true
If true, DOCX form fields and content controls are written to PDF and HTML reports as form fields. If false, they are written as text.
sql.smart-quote
true, false
false
If set to true, a '${var}' will be changed to ? instead of the regular substitution of '?'.
sql.timeout
any number 0 or greater (seconds)
Whatever the underlying data connector (JDBC) has as a default.
Set the timeout on SQL selects in the underlying SQL connector. A value of 0 is infinite and is NOT recommended.
trim.tables
aggressively
aggressively
For Excel only -- it will remove empty rows at the bottom of the table and empty columns on the right side of rows. It will remove formatted cells, but it will not remove cells with content or that are merged with other cells.
txt.font_name
any valid font name
Courier (Courier New on Windows)
Use this font instead of Courier to calculate text placement in the output.
txt.font_size
- 256
12 Use this font size instead of 12pt to calculate text placement in the output.
use.decimal
true, false
false
Set to true to use BigDecimal instead of Double in the macros. Useful in cases when String to Double rounding errors occur.
word.version
2007, 2010, 2013 or 2016
2016
The template will be parsed using the default values for that version of Word.
write.tags
0, 1, 2
2
When writing Tags to a report (when the data source for a Tag was not applied) it will write the Tags in the following format: 0 - text; 1 - field (Word), Report Designer macro (Excel), text (PowerPoint); 2 - field, bitmap/chart for Tags that produce a bitmap or chart (Word only).
xml.writer
stax, dom4j
stax (dom4j when running on Android)
Set to dom4j to use dom4j instead of stax to write xml files in generated reports (including the xml inside DOCX, PPT and XLSX files).
xpath.default.prefix
any string that’s a valid XML prefix
def
In an XPath query, the namespace with no prefix must have one. Set this to change the value used from def (for default).

Report Properties

Name Allowed Values Default Description
csv.cell_separator
any string
, In CSV reports, changes the separator between cells from "," to the specified string.
csv.quote_char
any string
" In CSV reports, changes the quote delimiter from " to this string.
csv.newline
any string
\r\n
In CSV reports, changes the new line string from \r\n (carriage return, line feed) to this string.
csv.trim_whitespace
true, false
false
In CSV reports, if set to true, all white space at the end of the cell contents in all cells will be trimmed.
html.full_file
true, false
true
The default value for ProcessOpenXmlAPI.getFullFile(). This can be overridden with a programmatic call to ProcessReport.setFullFile().
html.html_type
see setSpec()
see setSpec()
The default value for ProcessOpenXmlAPI.getSpec().This can be overridden with a programmatic call to ProcessReport.setSpec().
pdf.compression_level 0, 1 or 2
1
The default value for ProcessPdf.getCompressionLevel().This can be overridden with a programmatic call to ProcessPdf.setCompressionLevel().
pdf.font_level
0, 1 or 2
1
The default value for ProcessPdf.getCompressionLevel().This can be overridden with a programmatic call to ProcessPdf.setCompressionLevel().
pdf.key_length
40 or 128
40
The default value for ProcessPdf.getKeyLength().This can be overridden with a programmatic call to ProcessPdf.setKeyLength().
pdf.owner_password
any string
none
The default value for ProcessPdf.getOwnerPassword().This can be overridden with a programmatic call to ProcessPdf.setOwnerPassword().
pdf.PDF_A
on, off
off
The default value for ProcessPdf.isPdfA().This can be overridden with a programmatic call to ProcessPdf.setPdfA().
pdf.security
see getSecurity()
0 The default value for ProcessPdf.getSecurity().This can be overridden with a programmatic call to ProcessPdf.setSecurity().
pdf.user_password
any string
none
The default value for ProcessPdf.getUserPassword().This can be overridden with a programmatic call to ProcessPdf.setUserPassword().
report.hidden.mode
see ProcessReport.setHiddenMode()
0
The default for ProcessReport.getHiddenMode(). This can be overridden with a programmatic call to ProcessReport.setHiddenMode().
report.locale
any locale string (e.g. en_US)
the system locale
The default value for ProcessReport.setLocale(). You must use either a language (en) or language/country (en_US). This can be overridden with a programmatic call to ProcessReport.setLocale(). This is the locale used to process output like the default formatting of a currency amount.
report.locale_asian
any locale string (e.g. en_US)
the system locale for East Asian content
Similar to report.locale except used when content for a Tag is marked as East Asian.
report.locale_bidi
any locale string (e.g. ar_SA)
the system locale for bidi content
Similar to report.locale except used when content for a tag is marked as bi-directional.
txt.break_page
true, false
false
The default value for ProcessText.getBreakPage(). This can be overridden with a programmatic call to ProcessPdf.setBreakPage().
txt.show_headers
true, false
false
The default value for ProcessText.getUseMargins(). This can be overridden with a programmatic call to ProcessPdf.setUseMargins().
txt.use_margins
true, false
false
The default value for ProcessText.getUseMargins(). This can be overridden with a programmatic call to ProcessPdf.setUseMargins().
txt.use_soft_eoln
true, false
false
The default value for ProcessText.getUseSoftEoln(). This can be overridden with a programmatic call to ProcessPdf.setUseSoftEoln().

Miscellaneous Properties

Name Allowed Values Default Description
import.use.child.styles
true, false
true
(This property pertains to version 13.x; for applying/importing parent styles in versions 14.x and later, see the Import Tag Reference.) This is only used if an Import Tag does not have this property set. When an imported template's style settings don't match the master document this determines if default settings in the imported document will match the imported style (true) or the master style (false).
sql.parameters
substitution, parameters and parameters.always
parameters
Sets the default value in DataSourceProvider.setParamMode().
use.parent.format
true, false
false
(Version 13.x only. For applying/importing parent styles in versions 14.x and later, see the Import Tag Reference). This sets the default value for the Import Tag use-parent-format property. The default is false and does nothing. If set to true, then imported templates will have their first paragraph and character formatting set to that of the paragraph in the parent template where the Import Tag is located.

ImportFileClass

Use the ImportFileClass if you have a method for accessing files and/or security protocols that is not supported by Windward. See that attached file for a sample implementation

In the WindwardReports.properties file you can set the property ImportFileClass. You set it to the classname of the class you implement. For example, you can set:

ImportFileClass=net.windward.env.StandardImportFile

If that class exists, it will be used instead of the default class (which is net.windward.env.StandardImportFile). This class must be available to the Report Engine so it must be loaded with your application. The class must implement ImportFile. It has a single method that is passed the information of the file you wish to import and it returns the imported file.

0 Comments

Add your comment

E-Mail me when someone replies to this comment