1 Reply Latest reply: May 13, 2013 9:21 AM by j.gauger RSS

    COMPUTATION IN AN INTERACTIVE REPORT

    Eve
      Hi, I have a report on demo_orders table. I have use the agregate action of the interactive report, in order to get the sum of the column order_total. Now I want to calculate the percentage of each order. How can i use the compute action of the interactive report to do this.

      I appreciate your help
        • 1. Re: COMPUTATION IN AN INTERACTIVE REPORT
          j.gauger
          Hi,

          you cannot directly calculate the percentage for each order with the computation features of the IR. You would need to have the total over all orders as additional column in each record to build a computation on it. The IR does not support this out of the box.

          But fortunately Oracle supports analytic SQL. Using this feature your request can be solved with a little extension to the SQL statement. Try this:
          select order_id, customer_id, order_total, order_timestamp, user_id,
                 sum(order_total) over () sum_total
            from demo_orders
          The sum(order_total) over () does the trick!

          Jens