Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Numeric format mask problem (NLS_NUMERIC_CHARACTERS)

Numeric format mask problem (NLS_NUMERIC_CHARACTERS)

From: DanO <daniel.ostertag_at_visaer.com>
Date: 4 Feb 2004 10:24:26 -0800
Message-ID: <6e07b2d5.0402041024.625d064e@posting.google.com>


We have the necessity to override the 9iAS Server NLS settings to display reports with dynamic numeric format masks. We've done this with dates and it works fine.

It appears there is no way to override the 9iAS NLS_NUMERIC_CHARACTERS setting to display numbers according to parameters read by the RDF at run-time.

The server settings are:
<envVariable name="NLS_NUMERIC_CHARACTERS" value=",."/>
<envVariable name="NLS_LANGUAGE" value="FRENCH"/>
<envVariable name="NLS_TERRITORY" value="FRANCE"/>

However, we need to be able to change the group and decimal output regardless of the server setting.

We want the number 10000.00 which in English is 10,000.00 to also be displayed as 10.000,00 which is a European setting. If we use the following example in the numeric field format trigger of the RDF (langsetting is a parameter value passed to the RDF at runtime):

if langsetting = ‘EUROPE' then
DBMS_SESSION.SET_NLS('nls_numeric_characters', ''',.'''); else
DBMS_SESSION.SET_NLS('nls_numeric_characters', '''.,'''); end if;

srw.set_format_mask('99G999D99');

We also tried srw.set_format_mask('NNGNNND00') and srw.set_format_mask('99,999.99') or srw.set_format_mask('99.999,99').

Interestingly, the '99.999,99' will NEVER work. Using '99,999.00' always displays 10,000.00 regardless of the NLS settings on the server.

The DBMS_SESSION.SET_NLS does not override the 9iAS server setting of NLS_NUMERIC_CHARACTERS='comma,period', so the English version never comes up. If we switch the 9iAS server setting to ‘period,comma', it always gives us 10,000.00. If we use '99.999,99':

REP-1841: ',' is not allowed after the decimal point in a format mask.

Any ideas?

I did open a TAR (3535258.996 ) for this and got no solution, but thought I could find a workaround without defining a different environment variable (ENVID) for every possible language setting in the rep_server.conf.

Thanks. Received on Wed Feb 04 2004 - 12:24:26 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US