i have an interactive report in my apex page with numbers (money) in it, the default money format is U.S which is like this :
JavaScript
x
2
1
###,###,###,###.##
2
what i need is this :
JavaScript
1
2
1
### ### ### ###,##
2
is there a way to do so in HTML or in CSS or JAVASCRIPT
Advertisement
Answer
The display format in an apex report is determined by 2 parameters:
- Appearance > Format Mask of the column in your interactive report
- Decimal and Group separator set in the database session.
Decimal and group separator
In oracle this is determined at session level. You want ,
as decimal and space as group separator. To change this for your database session run the following statement.
JavaScript
1
2
1
ALTER SESSION SET NLS_NUMERIC_CHARACTERS = ', ';
2
- To change this for your entire application, set the following in Shared Components > Security > Database Session > Initialization PL/SQL Code
JavaScript
1
2
1
EXECUTE IMMEDIATE q'!ALTER SESSION SET NLS_NUMERIC_CHARACTERS = ', '!';
2
- To just set this for the page you have your report on you can either use an application process (with condition Current Page is contained within expression) = “your page” or a before header process to execute the
EXECUTE IMMEDIATE
statement above
Format Mask
The Number Format Models documentation might give you some clues here: 9
is a NUMBER, D
is the decimal separator, G
is the group separator. So you’re looking for 999G999G999G999D99
JavaScript
1
4
1
SELECT TO_CHAR(9866166747393/100,'999G999G999G999D99') from dual;
2
3
98 661 667 473,93
4
Set this as Appearance > Format Mask of the column in your interactive report.