Upon viewing the source I was able to track the problem down to the oReportDiv element which had a style attribute containing "overflow: auto;". I could see that by removing this overflow style or setting it to "visible" the extra scroll bars would disappear. The final solution was a challenge was the code here is contained within an iframe and I struggled with many JQuery attempts to remove the style. Eventually I was able to remove it using the following:
window.onload = function () { var viewer = document.getElementById("<%=reportViewer.ClientID %>"); var frame = document.getElementById("ReportFrame<%=reportViewer.ClientID %>"); if (frame != null && viewer != null) { var reportDiv = eval("ReportFrame<%=reportViewer.ClientID %>").document.getElementById("report").contentDocument.getElementById("oReportDiv"); reportDiv.removeAttribute("style"); } }
Thanks buddy it worked for me!!
ReplyDelete