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: Rich Zacharias <richard.zacharias_at_visaer.com>
Date: 5 Feb 2004 07:09:39 -0800
Message-ID: <9a18f51a.0402050709.77a4b1ad@posting.google.com>


"Gerard H. Pille" <ghp_at_skynet.be> wrote in message news:<402185E1.20400_at_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

Geert,

Thanks for the response (I am working with Dan on this). We tried this but it didn't work. We still have no way via the report RDF to override the NLS_NUMERIC_CHARACTERS setting on the server. The only way is to have a different ENVID setting for EACH client I.E. language possibility that defines the NLS_NUMERIC_CHARACTERS, so the report parameter list contains an ENVID to match that language. Very ugly...

Rich

Rich Received on Thu Feb 05 2004 - 09:09:39 CST

Original text of this message

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