1 Reply Latest reply on Jul 3, 2013 5:08 PM by ABD - DBA

    Interactive Report Aggregation Totals <- can these be put at the top of report or create button to go to last page?

    ABD - DBA

      I have a report and they want to totals on all the numeric columns, but the totals on are on the last page.  Is there a way to put the totals at the top, or have a button that takes you to the last page?

        • 1. Re: Interactive Report Aggregation Totals <- can these be put at the top of report or create button to go to last page?
          ABD - DBA

          I found some code in another thread and tweaked it to my liking...  Just place this in your Footer Region of your IR.  It displays the following First Page <> Last Page  below your report.  I've lost the link to the original code, but thanks for whom ever put it out there.

           

           

          <div id="first_last"><table><tr><td style="cursor:pointer;cursor:hand;text-decoration:underline">

          <img align="absmiddle" alt="First Page <"  title="First Page" onclick="gReport.navigate.paginate('pgR_min_row=1max_rows='+$v('apexir_NUM_ROWS')+'rows_fetched='+$v('apexir_NUM_ROWS'))" />

          </td><td style="cursor:pointer;cursor:hand;text-decoration:underline">

          <img align="absmiddle" alt="> Last Page" title="Last Page" onclick="gReport.navigate.paginate('pgR_min_row='+RetMinRow()+'max_rows='+$v('apexir_NUM_ROWS')+'rows_fetched='+$v('apexir_NUM_ROWS'))" />

          </td></tr></table></div>

          <script type="text/javascript">

          function htmldbIrtPagination(pRet){

          var p=$.trim($('#apexir_DATA_PANEL').find('td.pagination').find('span.fielddata').text());

          var a=new Array();var n=new Array();a=p.split(' ');

          $.each(a,function(i,v){if(!isNaN(v)){n.push(v)}});

          n.push($v('apexir_NUM_ROWS')*1);

          switch(pRet){case 'first':return n[0];case 'last':return n[1];case 'max':return n[2];case 'show':return n[3];default:return n}

          }

          function RetMinRow(){

          var lS=$v('apexir_NUM_ROWS')*1;

          var lM=htmldbIrtPagination('max')*1;

          var lN=lM*1/lS*1;

          lN=Math.floor(lN*1);

          if(lN*1>1){lN=lN*1*lS*1+1;if(lN*1>lM*1){lN=lN*1-lS*1}}else{lN=lM*1}

          return lN

          }

          </script>