2 Replies Latest reply: Oct 1, 2012 2:55 AM by AlexAnd RSS

    How to use SUM+Replace together in BI Publisher Reports?

    Yadagiri
      Hi Guys,

      I am trying to apply sum function in my report template for a column which contains formatted number (for example *1,999.00*). It is working absolutely fine until the number is less than *1,000*. I had tried with replace function to replace comma with null and tried to make the sum, but its showing me zero in the result.

      I am using *<?xdofx:sum(replace(NONRECOVERABLE_TAX,',',''))?>*

      Please help me in sorting out this issue.

      I need to obtain a result like

      I want a result something similar like this using xml tags,

      Suppose table a has data in TAXTAB column as

      ---------------
      TAX
      ---------------
      *300.00*
      *950.26*
      *1,256.32*
      *12,258.99*
      --------------

      I want to show the result as the following query results when run in sqlplus

      SELECT SUM(REPLACE(TAX,',','') TAX FROM TAXTAB;

      ---------------
      TAX
      ---------------
      *14765.57*

      Please help me in resolving this issue..any help can b appreciated

      Thanks in advance,
      Giri

      Edited by: 873954 on May 24, 2012 6:56 AM