Skip to main content
Windward

​.NET: App.exe.config Settings

Summary 

 

Put the properties in your config file and you’re good. The config file must be set as follows:

<configuration>
               <configSections>
                              <section name="WindwardReports" type="System.Configuration.NameValueSectionHandler" />
               </configSections>
               <WindwardReports>
                              <add key="license" value="EnterKeyHere" />
               </WindwardReports>
</configuration>

 

As a backup you can put the settings in the registry. For any property it looks for it as follows:

  1. In the application’s config file. To be more accurate, a call is made to ConfigurationManager.GetSection(“WindwardReports”) and if that item exists there, it is returned.
  2. It then looks in the registry in HCKU/Software/Windward Studios/Reporting Engine for a key with the name of the requested property.
  3. It finally looks in the registry in HCLM/Software/Windward Studios/Reporting Engine for a key with the name of the requested property.

Property/Config settings

For ImportFileClass, see the end of this article.

 

The below settings fall into three general categories:

  1. Read in and set when the engine starts. You need to restart the engine for new values to be read & used. Marked as Global.
  2. Read in and used every time a report runs. When you change these, the next report will use the new settings. Marked 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. Marked as Report.

 

asian.support

Category: Global

Allowed values: true, false

Default: 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

check.for.glyphs

Category: Local

Allowed values: on, off

Default: 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

Category: Local

Value: font name 1;font name 2;…

Default: MS Mincho;Arial Unicode MS

The list of fonts to consider when the specified font does not have the glyphs needed. Will use the font with the largest number of needed glyphs. If a tie in the number, will use the earlier one in the list.

check.for.ole.images

Category: Local

Allowed values: true, false

Default: true

If true the engine will check all images brought in via the out tag for an OLE header (used in Northwind & Access databases) and will strip it off. This checks so non-OLE images will work fine too.

csv.cell_separator

Category: Report - CSV

Allowed values: any string

Default: ,

In CSV reports changes the separator between cells from , to the specified string.

csv. quote_char

Category: Report - CSV

Allowed values: any string

Default: "

In CSV reports, changes the quote delimiter from " to this string.

csv.newline

Category: Report - CSV

Allowed values: any string

Default: \r\n

In CSV reports, changes the new line string from \r\n (carriage return, line feed) to this string.

csv.trim_whitespace

Category: Report - CSV

Allowed values: true, false

Default: false

In CSV reports, if set to true it will trim all whitespace at the ends of the cell contents in all cells.

default.chart.dpi

Category: Global

Allowed value: any number

Default: 300

When charts are rendered to a bitmap (for printers), they are rendered at this resolution.

default.image.dpi

Category: Global

Allowed values: any number

Default: 96

If a bitmap does not have it's DPI set, this is the value used.

expand.out.text

Category: Global

Allowed values: ignore, newline, paragraph.

Default: paragraph

What to do if an out tag has a <CR> and/or <TAB> in the text. Choices are ignore, newline, or paragraph. <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

Category: Global

Allowed values: fontname;fontname;…

Default: none

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

A series of paths, seperated by semicolons, to where the true type fonts are on the system. The only wildcard recognized is the * (ie, no regular expressions). The engine will look in the usualy directories on Windows & Linux, this setting is just for non-standard locations to also be read in.

font.map

Category: Global

Allowed values: fontname_replace1=fontname_substitute1;…

Default: none

Example: Arial=Courier New;Times New Roman=Verdana

Map use of one fant to another. In the example above any use of Arial in the generated report 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 engine is running on.

force.bitmap.format

Category: Global

Allowed values: bmp, gif, jpeg, png, & tiff

Default: none

This will force all bitmaps in the created report to be converted to the requested format. The default is no conversion.

function.files

(to be updated soon)

html.embed_images

Category: Local

Allowed values: true, false

Default: false

true to embed images in HTML output file. false to produce separate image files.

html.full_file

Category: Report

Allowed values: true, false

Default: true

The default value for ProcessOpenXmlAPI.getFullFile(). This can be overridden with a programatic call to Report.setFullFile().

html.html_type

Category: Report

Allowed values: see setSpec()

The default value for ProcessOpenXmlAPI.getSpec().This can be overridden with a programatic call to Report.setSpec().

html.split_pages

Category: Local

Allowed values: true, false

Default: false

Use true to produce multiple output files, one html file per document page. False creates one continuous HTML page.

ignore.tag.colors

Category: Global

Allowed values: true, false

Default: 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.

ImportFileClass  

import.use.child.styles

Category: import tag

Allowed values: true, false

Default true

This property pertains to versions 13.x; for applying/importing parent styles in versions 14.x, see Import Tags. This is only used if an import tag does not have this set as a property of the tag. 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).

layout.document

Category: Global

Allowed values: on, off

Default: 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 on the generated report. In this case the Report.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 that document production will be faster. This setting is ignored for formats we need to layout (PDF, printer, text, etc.)

license

Category: Global

Allowed values: a valid Windward license

Default: none

.NET: 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. If multiple lines, do not put spaces at the beginning/end of the lines.

line.break

Category: Local

Allowed values: internal, external

Default: internal

internal will use the Windward Reports internal line breaker.

external will use the Java or .NET runtime line breaker.

Windows default is external, default for other operating systems is internal. You need to use internal for hyphenation, small caps, font scaling, & font spacing to work in PDF & Printer output.

logging.filename

Category: Global

Allowed values: off, a_log4j_properties_filename

Default: 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

Category: Global

Allowed values: Any number

Default: 10000000

Set the maximum message size in the OData provider.

openxml.copy-drawings

Catagory: Report

Allowed values: true, false

Default: true

The default value for ProcessOpenXmlAPI.getCopyDrawings(). This can be overridden with a programatic call to Report. setCopyDrawings ().

openxml.copy-embedded-objects

Catagory: Report

Allowed values: true, false

Default: true

The default value for ProcessOpenXmlAPI.getCopyEmbeddedObjects(). This can be overridden with a programatic call to Report.setCopyEmbeddedObjects().

openxml.copy-metadata

Catagory: Report

Allowed values: see setCopyMetadata()

Default: 2

The default value for ProcessOpenXmlAPI.getCopyMetadata(). This can be overridden with a programatic call to Report.setCopyMetadata().

openxml.copy-shapes

Catagory: Report

Allowed values: true, false

Default: true

The default value for ProcessOpenXmlAPI.getCopyShapes(). This can be overridden with a programatic call to Report.setCopyShapes().

openxml.recalculate

Catagory: Report

Allowed values: true, false

Default: true for XLSX, false for DOCX & PPTX.

The default value for ProcessOpenXmlAPI.getRecalculateOnOpen(). This can be overridden with a programatic call to Report.setRecalculateOnOpen().

openxml.write-chart-as-chart

Catagory: Report

Allowed values: true, false

Default: true

The default value for ProcessOpenXmlAPI.getChartsAsCharts().This can be overridden with a programatic call to Report.setChartsAsCharts().

pdf.compression_level

Category: Report

Allowed values: 0, 1, or 2.

Default: 1

The default value for ReportPdf.getCompressionLevel().This can be overridden with a programatic call to ReportPdf.setCompressionLevel().

pdf.font_level

Category: Report

Allowed values: 0, 1, or 2.

Default: 2

This is the default value for ProcessPdf.setFontLevel(). You must use the number of the static final int specified in ProcessPdf. 
This can still be overridden with a programatic call to ProcessPdf.setFontLevel().

pdf.font_mapping

Category: Global

Allowed values: auto | postscriptFontname1=displayFontname1;…

Default: 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 explicit mapping and you can have as many as you wish.

pdf.key_length

Category: Report

Allowed values: 40 or 128.

Default: 40

The default value for ReportPdf.getKeyLength().This can be overridden with a programatic call to ReportPdf.setKeyLength().

pdf.makeLineToFit

Category: Global

Allowed values: true, false.

Default: true

Set to true to force PDF text to be fit within its measured (when the engine determined layout) length. Set to false to have the text take the width Acrobat calculates.

pdf. owner_password

Category: Report

Allowed values: any string.

Default: none

The default value for ReportPdf.getOwnerPassword().This can be overridden with a programatic call to ReportPdf.setOwnerPassword().

pdf.PDF_A

Category: Report

Allowed values: on, off.

Default: off

The default value for ReportPdf.isPdfA().This can be overridden with a programatic call to ReportPdf.setPdfA().

pdf.rgbTransparencyBlendingSpace

Category: Global

Allowed values: true, false.

Default: false

set to false to turn off using the RGB space for image color blending in the PDF.

pdf.security

Category: Report

Allowed values: see getSecurity().

Default: 0

The default value for ReportPdf.getSecurity().This can be overridden with a programatic call to ReportPdf.setSecurity().

pdf.user_password

Category: Report

Allowed values: any string.

Default: none

The default value for ReportPdf.getUserPassword().This can be overridden with a programatic call to ReportPdf.setUserPassword().

report.hidden.mode

Category: Report

Allowed values: see Report.setHiddenMode()

Default: 0

The default for Report.getHiddenMode(). This can be overridden with a programatic call to Report.setHiddenMode().

report.hyphenate

Category: Local

Allowed values: 0, 1, or 2

Default: 1

Set to hyphenate generated reports. 0: do not hyphenate, 1: hyphenate if auto-hyphenate set in template, 2: hyphenate.

report.locale

Category: Report

Allowed values: any locale string

Example: en_US

Default: the system locale.

The default value for Report.setLocale(). You must use either a language (en) or language/country (en_US). This can be overridden with a programatic call to Report.setLocale(). This is the locale used processing the report for things like the default formatting of a currency amount.

report.locale_asian

Category: Report

Allowed values: any locale string

Example: en_US

Default: 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

Category: Report

Allowed values: any locale string

Example: ar_SA

Default: the system locale for bidi content.

Similar to report.locale except used when content for a tag is marked as bi-directional.

report.remove-unused-formats

Category: Local

Allowed values: true, false

Default: false

Set to true to remove unused formats (Word only).

report.timeout

Category: Local

Allowed values: any number greater than 0

Default: none

Set to seconds. 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 has passed the timeout. So a timeout of 30 seconds may not throw an exception until 45 seconds.

report.trim

Category: Local

Allowed values: none, end.whitespace, & end.blank

Default: none

Set this to trim whitespace 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

Category: Local

Allowed values: true, false

Default: 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.parameters

Category: DataSourceProvider

Allowed values: substitution, parameters, & parameters.always

Default: parameters

Sets the default value in DataSourceProvider.setParamMode().

sql.smart-quote

Category: Local

Allowed values: true, false

Default: false

If set to true a '${var}' will be changed to ? instead of the regular substitution of '?'.

sql.timeout

Category: Local

Allowed values: any number 0 or greater

Default: Whatever the underlying data connector (ADO.NET) has as a default.

Set the timeout on SQL selects in the underlying sql connector. A value of 0 is infinite and is NOT recomended.

system.locale

Category: Global

Allowed values: any locale such as de or de_CH

Default: the system locale

Set the locale for system messages.

trim.tables

Category: Local

Allowed Values: aggressively

Default: 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.break_page

Category: Report

Allowed values: true, false.

Default: false

The default value for ProcessText.getBreakPage(). This can be overridden with a programatic call to ReportPdf.setBreakPage().

txt.font_name

Category: Local

Allowed values: Any valid font name.

Default: Courier (Courier New on Windows).

Use this font instead of Courier to calculate text placement in the output.

txt.font_size

Category: Local

Allowed values: 6 - 256.

Default: 12

Use this font size instead of 12pt to calculate text placement in the output.

txt.show_headers

Category: Report

Allowed values: true, false.

Default: false

The default value for ProcessText.getShowHeaders(). This can be overridden with a programatic call to ReportPdf.setShowHeaders().

txt.use_margins

Category: Report

Allowed values: true, false.

Default: false

The default value for ProcessText.getUseMargins(). This can be overridden with a programatic call to ReportPdf.setUseMargins().

txt.use_soft_eoln

Category: Report

Allowed values: true, false.

Default: false

The default value for ProcessText.getUseSoftEoln(). This can be overridden with a programatic call to ReportPdf.setUseSoftEoln().

Use.decimal

Category: Local

Allowed: true, false

Default: false

Set to true to use BigDecimal instead of Double in the macros. Useful in cases when String to Double rounding errors occur.

use.parent.format

Category: import tag

Allowed values: true, false

Default: false

(Version 13.x only. For applying/importing parent styles in versions 14.x, see Import Tags). 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 & character formatting set to that of the paragraph in the parent template where the import tag is located.

word.version

Category: Local

Allowed values: 2007, 2010, 2013, or 2016

Default value: 2016

The template will be parsed using the default values for that version of Word.

write.tags

Category: Local

Allowed values: 0, 1, 2

Default: 2

When writing tags to a report (when the datasource for a tag was not applied) it will write the tags in the following format: 0: text, 1: field (Word), autotag macro (Excel), text (PPT), 2: field, bitmap/chart for tags that produce a bitmap or chart (Word only).

xpath.default.prefix

Category: Local

Allowed values: any string that’s a valid XML prefix.

Default: def

In an XPath query, the namespace with no prefix must have one. Set this to change the value used from def (for default).

 

ImportFileClass

Use this if you have a method for accessing files and/or security protocols that are not supported by Windward. Click here for a sample implementation.

 

In the config file you can set the property ImportFileClass. You set it to the classname of the class you implement. For example, in a properties file 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 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.