function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ScrapsScraps 

SF Report Embedded in an S-Control - Remove Grand Total Column

Hi,

I know I should probably use visualforce somehow, but i've inherited a system that i'm not ready to make wholesale changes to just yet.

A matrix report is embedded in an S-Control using the following code:

Code:
Embedded Report:<br>
<!--
https://emea.salesforce.com/00O20000001uILK—pv0=00120000008XmLY
-->

<div style="vertical-align: middle; align:center; cursor:pointer;" align="center" id="embedreport" name="embedreport" onclick="clicked('00O20000001uILK', accid);" onLoad="loadreport('00O20000001uILK', accid);”>
<img src="/img/waiting_dots.gif" border="0">
</div>

<script>loadreport('00O20000001uILK', accid, 'embedreport');</script>

<br>

Hopefully someone knows a way to prevent the Grand Total Column displaying, either at the source or just by cropping the image. Any suggestions would be greatly appreciated.

Regards
Adrian
 

RexRex

Hi,

I wouldnt recommend this but since you asked for it.

You will have to iterate through all the tags in the report and find appropriate one which has Grand Totals. Then remove the rest of the tags following it. Since these tags dont have an ID its not simple as use getelementbyid in javascript. Hope this helps

ScrapsScraps

Thanks Rex,

 

I don't like doing it either, but i'm just trying to keep my head above water at the moment.

 

Thanks

insanedukeposseinsanedukeposse
Scraps - is that the entire code for the S-Control? I'm trying something similar and I keep getting a JavaScript error, and the report won't load. I feel like I'm missing something...
ScrapsScraps
There's actually 5+ pages of code - a lot of css stuff and other data is displayed. Happy to provide further details if you can give me your email.