We have many reports which we use on the website. While exporting some reports as PDF, the file size gets huge and the server crashes due to load. So it would be great if I
You can use a div over that save button and set its properties like below
<div style="
background-color: white;
z-index: 100;
height: 61px;
position: absolute;
padding-left: 500;
padding-left: 36px;
margin-left: 370px;
opacity: 0.5;
"></div>
I was using the MvcReportViewer library to get SSRS's report viewer in our MVC application. The library does not support User Control lifecycle events, so I was not able to use the PreRender method given by shamcs. The Javascript method described by Ristanovic Marko partially works, but the selectors did not work for the version of SSRS we were using, it requires JQuery to be loaded in the IFrame, and it does not describe a way to do this only for specific reports. Here's what I came up with:
In my ReportViewer partial, I added the following script block:
var frame = $('#reportframe');
var src = frame.attr('src');
frame.attr('src', src + '?showAdditionalExports=' + @ViewBag.ShowExportsAttribute);
In ReportViewerWebForm.aspx, I added another script block:
var urlParams = new URLSearchParams(location.search);
if (urlParams.get('showAdditionalExports') === 'true') {
document.addEventListener("DOMContentLoaded",
function() {
['Word', 'Excel'].map(function(title) {
var menuItem = document.querySelector("#ReportViewer1 a[title='" + title + "']")
.parentNode;
menuItem.parentNode
.removeChild(menuItem);
});
});
}