Oracle Analytics Cloud and Server

Products Banner

how to use format mask in rtf template

Received Response
81
Views
3
Comments

Summary

how to use format mask in rtf template

Content

Hi All,

 

How to use this code in rtf template?

 

SELECT TO_CHAR (TO_NUMBER (LINE_AMOUNT, 'FM9G999G999G999G990D99999'),'FM9G999G999G999G990D00000') AS formatted_value

  FROM DUAL

 

Thank you,

Tagged:

Answers

  • YGUTTIKONDA
    YGUTTIKONDA ✭✭✭✭✭

    try using XDOFX commands or XSLT samples below

    <?xdofx:to_char('12345')?>

    <?xdofx:to_number('12345')?>

    <?format-number:fieldname;'999G999D99'?>

  • mist123
    mist123 ✭✭✭

    Hi Thank you,

    YGUTTIKONDA wrote:try using XDOFX commands or XSLT samples below <?xdofx:to_char('12345')?><?xdofx:to_number('12345')?><?format-number:fieldname;'999G999D99'?>

    How to use above code with SQL code ?

    <LINE_AMOUNT>100<LINE_AMOUNT/> -->it is displaying 100.00000 if i use <?format-number:fieldname;'999G999D9999'?>

    <LINE_AMOUNT>1,000.00<LINE_AMOUNT/> -->it is not displaying 1,000.00000 if i use <?format-number:fieldname;'999G999D9999'?>

    image

    I have PO Output for communication report and customized rtf template to see the PO Document output in PDF

  • Sketz
    Sketz ✭✭✭

    Your second LINE_AMOUNT already has a formatting (like 9G999D99). The format-number tag is compartible only with plain numbers.

    So if your xml would be like <LINE_AMOUNT>1000<LINE_AMOUNT/> the formatting should be used and therefore the output should also be correct.