In IE 10 we have a bug for it when we render reports. The report width is not made 100% how it is done in IE9 and IE11.
The problem from what I have seen is because the div with id ‘ReportViewer_ctl09’ contained into the ReportViewer body and used to render the report has defined inline styling. This inline styling looks like this:
<div id="ReportViewer_ctl09" style="width: 100%; height: 100%; overflow: auto; ;">
If I remove ‘auto’ value for overflow then it look ok in IE 10 also. This I’ve done it into the browser, here actually it takes the setting and uses it for the control. From code I was not able to set it.
The ReportViewer is defined like below and also has an event for onLoad.
` ;"> @Html.MvcReportViewer(path, null, null, null, null, new ControlSettings() { //KeepSessionAlive = true, BackColor = ColorTranslator.FromHtml("#fffffe"), SplitterBackColor = ColorTranslator.FromHtml("#fffffe"), InternalBorderColor = ColorTranslator.FromHtml("#dedede"), ToolBarItemBorderColor = ColorTranslator.FromHtml("#dedede"), LinkActiveHoverColor = ColorTranslator.FromHtml("#83AFDF"), ToolBarItemHoverBackColor = ColorTranslator.FromHtml("#83AFDF") }, new { style = "width: 100%; height: 900px; border: none", frameborder = "0", id="MvcReportViewer", name="MvcReportViewer", onload = "onLoadIframe(this); " } )
function onLoadIframe(obj){var isChrome =/chrome/.test(navigator.userAgent.toLowerCase());if(isChrome){// in Chrome iFrame shows scrollbars for the content and also for himself.// applyed attribute removes the scrollbars of iframe and let the ones for // it's body $('#MvcReportViewer').attr("scrolling","no");}if($.browser.msie && parseFloat($.browser.version)==10){ $('#ReportViewer_ctl09').css("overflow","visible !important");}}
When the view is loaded first time it executes the onLoadIframe method but the overflow setting is not changed.
When the ViewReport submit button is pressed then the report is rendered but still the overflow value is set on ‘auto’.
I’ve looked for a specific event like OnRenderComplete for ReportViewer but this does not have a such event defined.
In case you had similar issues or maybe you have any idea how to solve this bug please let me know. Thank you.