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 -> Re: Numeric format mask problem (NLS_NUMERIC_CHARACTERS)

Re: Numeric format mask problem (NLS_NUMERIC_CHARACTERS)

From: Gerard H. Pille <ghp_at_skynet.be>
Date: Thu, 05 Feb 2004 00:53:05 +0100
Message-ID: <402185E1.20400@skynet.be>


DanO wrote:
> 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.

Hallo Daniel,

the help says that you should do this in the Before Report Trigger, I don't know where you tried to change the settings. In the help, they advise srw.do_sql but if that would make a difference?

Geert Received on Wed Feb 04 2004 - 17:53:05 CST

Original text of this message

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