ReportViewer Control - Height issue ReportViewer Control - Height issue asp.net asp.net

ReportViewer Control - Height issue


This is the way I fixed, take a look

<div style="Width:auto;"> <form id="form1" runat="server" style="width:100%; height:100%;">    <asp:ScriptManager ID="ScriptManager1" runat="server">    </asp:ScriptManager>    <rsweb:ReportViewer ID="rptViewer" runat="server" Width="100%" Height="100%" AsyncRendering="False" SizeToReportContent="True">    </rsweb:ReportViewer></form></div>

The thing doing the magic is AsyncRendering="False" SizeToReportContent="True" the rest is basic HTML. The report will be displayed as it was designed.

There might be some code extra, but see if it works for you.

Hope it helps


this is the way i fixed it, setting the height dynamically using javascript, it works with both IE and Firefox. also works with reports larger than the maximum window size.

<rsweb:ReportViewer ID="ReportViewer1" runat="server" Width="100%" ShowBackButton="True" ProcessingMode="Remote" /><script language="javascript" type="text/javascript">    ResizeReport();    function ResizeReport() {        var viewer = document.getElementById("<%= ReportViewer1.ClientID %>");        var htmlheight = document.documentElement.clientHeight;        viewer.style.height = (htmlheight - 30) + "px";    }    window.onresize = function resize() { ResizeReport(); }</script>


I had the same problem with ReportViewer 11.0 and what did the trick for me was to set

Height="100%" SizeToReportContent="true"while keeping AsyncRendering="true"

Eg

<rsweb:ReportViewer ID="reportControl" runat="server" Width="750" Height="100%" AsyncRendering="true" SizeToReportContent="true">

This actually generated a table with height="100%" for the control.