Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

NLS parameters in Oracle Reports

788 views
Skip to first unread message

joe...@comcast.net

unread,
Mar 14, 2005, 3:04:14 PM3/14/05
to
Hi;

The Oracle documentation seems to be saying that if you would like to
modify language/territory (i.e. NLS) parameters, for a report, at
runtime, you can issue 'Alter Session' statements in a before report
trigger.

I have tried several alter session statements in the before report
trigger but they have no effect on how my data is displayed. Any ideas
as to what I'm doing wrong? Here is my before trigger:

Thanks - Joe T

function BeforeReport return boolean is
begin
SRW.DO_SQL ('ALTER SESSION SET NLS_ISO_CURRENCY = FRANCE');
SRW.DO_SQL ('ALTER SESSION SET NLS_DATE_LANGUAGE = French');
SRW.DO_SQL ('ALTER SESSION SET NLS_NUMERIC_CHARACTERS = '',.''');
SRW.DO_SQL ('ALTER SESSION SET NLS_DATE_FORMAT = ''YYYY MM DD
HH24:MI:SS''');
return (TRUE);
end;

Frank van Bortel

unread,
Mar 14, 2005, 3:33:49 PM3/14/05
to

I see no problems with the syntax, nor typo's (assuming the
date format is wrapped by my reader).
How does it look, how do you want it to look, what versions
reports/database?!?
--
Regards,
Frank van Bortel

joe...@comcast.net

unread,
Mar 14, 2005, 5:27:30 PM3/14/05
to
Hi Frank;

Thanks for the reply. I'm using 10g. The Reports builder in 10 g is
9.0.4.33. The DB is 9i. My understanding was that if I set the NLS
properties, the number, date, and currency fields will be displayed in
a mask that is appropriate for that language, providing I haven't set
an explicit mask for the field. However, I've seen several threads
(many on Oracles discussion board) indicating that other people are
also unable to get the Alter Session commands to have any impact on
reports. One poster said that the alter statement will work for Forms
but not reports.

My goal would be to write one report which would handle multiple
languages. The non-data text fields (titles, col headings, etc), I
would retrieve from resource files based on the language. However,
getting the dates, numbers and currencies (the data) to format with
language dependent masks is the other piece to the puzzle. The Oracle
documentation seems to indicate that setting the NLS parameters will
cause the numbers, dates, and currencies to display in the format based
on the NLS parameters.

So, for example, in France, the thousand seperator is a space and the
decimal point is a comma. I am hoping that by simply setting the NLS
parameters (not in the environment but at runtime in the before report
trigger) the numbers will be displayed that way.

Have you successfully used an alter stmt on a report trigger?

I've read that an alternative is to pass the language/territory in on
the URL statement to the reports server. However, at this point I
don't have a full fledged report server. I am simply using the reports
developer installed locally on my machine.

Thanks for your help!
Joe T

Frank van Bortel

unread,
Mar 15, 2005, 7:55:44 AM3/15/05
to

No, sorry, I was just thinking along with you.
What about using the system parameters CURRENCY,
DECIMAL and THOUSANDS?
Can be specified when the report is called, iirc

joe...@comcast.net

unread,
Mar 15, 2005, 1:52:42 PM3/15/05
to
I'll give those a try..

Thanks Frank!

Joe

0 new messages