Protected by Copyscape Web Copyright Protection Software

Pages

Search This Blog

Wednesday, June 26, 2013

How to display number in words in oracle XML Publisher?

hai by using below functions we can display the numbers as words.

in Xml layout take form fields and insert below tags in that form fields.

<?xdoxslt:toWordsAmt(round(TOTAL_AMOUNTS1))?>

Here TOTAL_AMOUNTS1 is the column which have number data type.

<?xdofx:to_check_number(to_number(TOTAL_AMOUNTS1), 'INR', 'CASE_LOWER', 'DECIMAL_STYLE_WORDS')?>


<?xdofx:nvl(substr(to_check_number(to_number(TOTAL_AMOUNTS1), 'INR', 'CASE_LOWER', 'DECIMAL_STYLE_WORDS'),
              1,instr(to_check_number(to_number(TOTAL_AMOUNTS1), 'CASE_PROPER', 'DECIMAL_STYLE_WORDS'),’Paise’,1)-5),
              to_check_number(to_number(TOTAL_AMOUNTS1), 'CASE_PROPER', 'DECIMAL_STYLE_WORDS'))||'********'?>

We can also use below function

   IBY_AMOUNT_IN_WORDS.Get_Amount_In_Words(TOTAL_AMOUNTS1)

we can check this in below sample block.

Example:

declare
v1 VARCHAr2(2000);
begin
v1:=IBY_AMOUNT_IN_WORDS.Get_Amount_In_Words(p_amount =>101324546014);
dbms_output.put_line('amount: '||v1);
end;


hope this will help you........

No comments:

Post a Comment