First issue was the incorrect rendering of the toolbar in Chrome and Safari browsers. At last I found a piece of JS which fixes that (it uses JQuery):
// fix reportviewer toolbar in Chrome / Safari
if ($.browser.safari)
{
$("#<%=rvw1.ClientID %> table").each(function (i, item)
{
$(item).css('display', 'inline-block');
});
}
Second issue was related to apparently well known problem in IE, where the control would render double vertical scrollbars in the report body. Again, I found some JS script fragments that helped me to solve the issue:
// fix the report body size to prevent double-scrollbars in IE
window.onload = function ()
{
var viewer = document.getElementById("<%=rvw1.ClientID %>");
var frame = document.getElementById("ReportFrame<%=rvw1.ClientID %>");
if (frame != null && viewer != null)
{
var reportDiv = eval("ReportFrame<%=rvw1.ClientID %>").document.getElementById("report").contentDocument.getElementById("oReportDiv");
reportDiv.style.height = viewer.style.height;
}
}
1 comment:
Hi. I used similar code but instead of trying to set the size (which I didn't seem to work well). I instead remove the overflow: auto style which fixes the problem completely. I've posted the code on my blog: http://beakdev.blogspot.ca/2012/04/double-scrollbars-in-reportviewer-for.html
Post a Comment