Search
Wednesday, November 19, 2008 ..:: Forum ::.. Register  Login
 
  Forum  Templates  Tags & Template...   Input & Pattern formatting and LOCALE
Previous Previous
 
Next Next
New Post 1/23/2008 5:38 PM
Resolved
  rfligg
45 posts
7th Level Poster


Input & Pattern formatting and LOCALE  

nput and Pattern are attributs of the <wr:out tag and are accessible from Autotag wizard.

I work on Win XP SP2 French and Word 2003 French.

I set the type to CURRENCY -> the values were displayed like $1000.11 while the Region Setting was French(Swiss) with Sfr as currency symbol.
I set the type to NUMBER with a pattern #'##0.00 -> The values were displayed as 1,000.00

Then I set the LOCALE to English(US) and drop the $ symbol and changed the grouping symbol (from , to ')

Everything worked fine: the values were correctly displayed.

Conclusion:
Java Windward engine using the DecimalFormat class does not take into account the LOCALE but only the symbols used for the locale English(US).
Not really friendly as I don't want to change my LOCALE just for Windward.

 
New Post 1/23/2008 5:39 PM
  rfligg
45 posts
7th Level Poster


Re: Input & Pattern formatting and LOCALE  

In the engine there are 3 ways the locale ccan be used - This is explained the Systems Administrator information guide located here:

http://www.windwardreports.com/downloads/manuals/Windward%20Reports%20.NET%20System%20Administrators%20Guide.pdf

The option you want to pay attention to is on page 15.

It is

report.locale=de_CH or report.locale=de
The default locale for ProcessReport.setLocale(). This can be overridden with a programmatic call to ProcessReport.setLocale(). This setting affects:
the default locale in the output report (rtf only)
display the print time field
the out tag when the type attribute is set.

This will hardcode the locale for your report generation.

Under AutoTag it uses the default locale. That can be overridden in word.exe.config by putting that in the same directory as word.exe and setting properties for the engine.

-- Ryan

 
New Post 1/23/2008 5:39 PM
  rfligg
45 posts
7th Level Poster


Re: Input & Pattern formatting and LOCALE  

I should be dummy as I created a winword.exe.config (there is a winword.exe) and a word.exe.config as well to make sure, in the folder C:\Program Files\Microsoft Office\OFFICE11

Both files contain the single line:

report.locale=en_HK

I restarted Word 2003 (making sure there is no hidden word.exe process still running) but I don't see any impact: the currency format of "<wr:out" uses always the settings of fr_FR (while the system LOCALE is set to French(Swiss) )

 
New Post 1/23/2008 5:39 PM
  rfligg
45 posts
7th Level Poster


Re: Input & Pattern formatting and LOCALE  

 Could you provide me with a word.exe.config ?
As well as the operations I have to do (restart Word, set env. variable, and so on).

Regards
Frank

 
New Post 1/23/2008 5:40 PM
  rfligg
45 posts
7th Level Poster


Re: Input & Pattern formatting and LOCALE  

 Here are the contents of a word.exe.config file. This file is the same as WindwardReports.dll.config:

------------------------
<?xml version="1.0" encoding="utf-8"?>

<!-- This file is not used when running! You must copy these entried over to your App.exe.config file -->

<configuration>
<configSections>
<section name="WindwardReports" type="System.Configuration.NameValueSectionHandler"/>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
</configSections>

<WindwardReports>
<!-- Put your key here. Multiple lines are ok but do not put spaces at the ebginning/end of the lines -->
<add key="license" value="enter your license key here"/>

<!-- sample settings
<add key="line.break" value="internal"/>
<add key="default.chart.dpi" value="300"/>
<add key="html.full_file" value="true"/>
<add key="html.html_type" value="1"/>
-->
</WindwardReports>

<!-- This will log to both the console and a log file. You may want to change this. -->
<log4net>
<appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender">
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger [%ndc] - %message%newline"/>
</layout>
</appender>
<appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">
<param name="File" value="/Windward.log" />
<param name="AppendToFile" value="true" />
<param name="MaxSizeRollBackups" value="2" />
<param name="MaximumFileSize" value="100KB" />
<param name="RollingStyle" value="Size" />
<param name="StaticLogFileName" value="true" />
<layout type="log4net.Layout.PatternLayout">
<param name="ConversionPattern" value="%d [%t] ac.server %-5p %c - %m%n" />
</layout>
</appender>
<root>
<level value="INFO"/>
<appender-ref ref="ConsoleAppender"/>
<appender-ref ref="RollingFileAppender" />
</root>
</log4net>

</configuration>
-------------------------------------

--Ryan

 
Previous Previous
 
Next Next
  Forum  Templates  Tags & Template...   Input & Pattern formatting and LOCALE
Membership Membership:
Latest New User Latest: Chris Gartsen
New Today New Today: 0
New Yesterday New Yesterday: 0
User Count Overall: 66

People Online People Online:
Visitors Visitors: 0
Members Members: 1
Total Total: 1

Online Now Online Now:
01: david
All contents copyright (c) 2002 - 2008 by Windward Studios, Inc. All Rights Reserved.   Terms Of Use  Privacy Statement