Home » Developer & Programmer » Reports & Discoverer » Numeric seperators in delimited output (Reports 11g)
Numeric seperators in delimited output [message #639643] Mon, 13 July 2015 08:53 Go to next message
leeweb
Messages: 14
Registered: March 2007
Location: Cardiff, UK
Junior Member
Hi there,

I have a problem that I'm hoping someone has experienced, and can therefore help me with. We are currently in the process of migrating from Forms and Reports 6i to 11g. In the most part, this has been a successful process, and everything seems to be working well. Everything, that is, except for delimited output via the reports server. Here, we are getting the wrong numeric seperators. For example, a value we would expect to be displayed as 123.45 is actually being displayed as 123,45 in the file that is output.

I have checked the NLS settings, and have even run SQL*Plus and SQL Developer queries to produce the output in hope of recreating the issue, but each time the seperators are correct. It is only when I invoke a report from web deployed forms, which is then processed and distributed by the reports server, that I am getting the separator issue. I have now spent a couple of days reading up on possible causes, but don't appear to be any nearer getting it working.

Can anybody help? If I have not provided enough information, then please let me know what is needed to help me resolve this. Your help, as previously, is much appreciated,

Lee
Re: Numeric seperators in delimited output [message #639662 is a reply to message #639643] Mon, 13 July 2015 15:34 Go to previous messageGo to next message
Littlefoot
Messages: 21510
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
What is NLS_NUMERIC_CHARACTERS set to?

One option (stupid, though - you certainly won't edit all reports) would be to include TO_CHAR as
SQL> select to_char(3/5, '999G990D00', 'nls_numeric_characters=''.,''') res
  2  from dual;

RES
-----------
       0.60

SQL>


Did you try to set it in your reports_server.CONF file?
Re: Numeric seperators in delimited output [message #639672 is a reply to message #639662] Tue, 14 July 2015 02:20 Go to previous messageGo to next message
leeweb
Messages: 14
Registered: March 2007
Location: Cardiff, UK
Junior Member
Hi there. Thanks for the reply. I think I found the issue, but need to find a window to restart the reports server to confirm. A developer who has since left had set up environments in the rwserver.conf file, and had set the NLS_NUMERIC_CHARACTERS variable the wrong way around. Hopefully, when I restart the reports server, all will be OK. I shall report back once I've tried it, along with an example of the code to help others in the same situation Smile
Re: Numeric seperators in delimited output [message #640113 is a reply to message #639672] Wed, 22 July 2015 09:16 Go to previous messageGo to next message
leeweb
Messages: 14
Registered: March 2007
Location: Cardiff, UK
Junior Member
Hi guys,

Sorry for the delay in getting back to everyone. It's been crazy Smile

Just in case anyone else gets a similar issue, here is what I did.

I modified the rwserver.conf file (located at <Drive Letter>:\Oracle\Middleware\asinst_1\config\ReportsServerComponent\<report server name>), changing the engine declaration to add the "defaultEnvId" parameter, as below:

<engine class="oracle.reports.engine.EngineImpl" defaultEnvId="GB" engLife="50" id="rwEng" maxEngine="4" maxIdle="30" minEngine="1"/>


I then added the following sections for each location where the application will be deployed:

<environment id="GB">
        <envVariable name="NLS_LANG" value="ENGLISH_UNITED KINGDOM.WE8MSWIN1252"/>
        <envVariable name="NLS_CURRENCY" value="£"/>
        <envVariable name="NLS_NUMERIC_CHARACTERS" value=".,"/>
    </environment>
    <environment id="IT">
        <envVariable name="NLS_LANG" value="ITALIAN_ITALY.WE8MSWIN1252"/>
        <envVariable name="NLS_CURRENCY" value="EUR"/>
        <envVariable name="NLS_NUMERIC_CHARACTERS" value=",."/>
    </environment>
    <environment id="ESP">
        <envVariable name="NLS_LANG" value="SPANISH_SPAIN.WE8MSWIN1252"/>
        <envVariable name="NLS_CURRENCY" value="EUR"/>
        <envVariable name="NLS_NUMERIC_CHARACTERS" value=",."/>
    </environment>


In theory, this will allow me to simply change the default environment in the file based on its deployment location, but keep everything else identical. Hopefully, someone will stumble across this if they are having the same pain as me. For the record, we are using Windows servers, and the change didn't take effect until I restarted Windows. Possibly a config issue our end, but worth bearing in mind if the changes don't seem to be taking effect,

Thanks for reading,

Lee
Re: Numeric seperators in delimited output [message #640115 is a reply to message #640113] Wed, 22 July 2015 09:40 Go to previous message
cookiemonster
Messages: 13726
Registered: September 2008
Location: Rainy Manchester
Senior Member
Thanks for letting us know
Previous Topic: please I need help
Next Topic: Need to write French character
Goto Forum:
  


Current Time: Thu Nov 21 23:10:28 CST 2019