3 Replies Latest reply: Mar 24, 2012 3:11 PM by ChrisS. RSS

    Column total in classic report clobbered by "report total" label

    ChrisS.
      Hi folks

      As implied by the subject, the first column of my report is one of several which contains values which I wish to have totalled. But the "report total" label seems to insist on appearing in the first column. Perhaps the first column not flagged as requiring totals would be a better choice. If I replace the default label text with a nbsp symbol, I get neither label nor total. I tried to specify the column header of a more appropriate column for the label to appear in, but this resulted in all subsequent column totals being bumped along as well.

      I don't see a way to control this output in the report template. This seems to be too obvious a restriction for a widely known solution not to exist, but a thread search didn't locate anything useful.

      I could of course switch my columns around, but the order has been deliberately chosen for valid reasons.

      Any suggestions?

      Thank you and regards
      CS
        • 1. Re: Column total in classic report clobbered by "report total" label
          Aljaz
          Hi,

          If you must preserve the order of columns, then you can do the following:

          Change reports properties
          1) Under Report Attributes -> Layout and Pagination: change property "Strip HTML" to NO
          2) Under Report Attributes -> Break Formating: set "Report Sum Label" to *<table><tr><td id="x123"> </td></tr></table>*

          Create dynamic action
          Advance

          Event:After Refresh
          Selection Type: DOM Object
          DOM Object : x123
          Condition: - No Condition -

          Action: Set Value
          Fire on Page Load: Yes
          Set Type:SQL statement
          SQL Statement: select sum(comm) from emp --my example is on table emp and first column is comm

          Selection Type: DOM Object
          DOM Object: x123

          You can check example on
          http://apex.oracle.com/pls/apex/f?p=60428:2
          username:demo
          password:demo

          Regards,
          Aljaz
          • 2. Re: Column total in classic report clobbered by "report total" label
            fac586
            ChrisS. wrote:
            Hi folks

            As implied by the subject, the first column of my report is one of several which contains values which I wish to have totalled. But the "report total" label seems to insist on appearing in the first column. Perhaps the first column not flagged as requiring totals would be a better choice. If I replace the default label text with a nbsp symbol, I get neither label nor total. I tried to specify the column header of a more appropriate column for the label to appear in, but this resulted in all subsequent column totals being bumped along as well.

            I don't see a way to control this output in the report template. This seems to be too obvious a restriction for a widely known solution not to exist, but a thread search didn't locate anything useful.

            I could of course switch my columns around, but the order has been deliberately chosen for valid reasons.

            Any suggestions?
            Confirmed. Never noticed this before. It would appear the vast majority of reports do not have totals in the first column. However the built-in calculations/totals are a very basic feature: they only aggregate function provided is <tt>SUM</tt>, breaks/subtotals are lmited and unintuitive. I'd suggest you abandon the built-in calculations and do it yourself in the query using <tt>GROUP BY...ROLLUP...HAVING...</tt> and <tt>GROUP_ID</tt>/<tt>GROUPING</tt>/<tt>GROUPING_ID</tt>, and if necessary a custom report template.
            • 3. Re: Column total in classic report clobbered by "report total" label
              ChrisS.
              Thank you both for your suggestions. Both would be viable if I wasn't so lazy. I will continue for the time being to describe this as an apex bug to my long-suffering users.

              Regards
              CS