Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ReportViewer Control - Height issue

In my asp.net application, I am trying to open a particular report. I have the ReportViewer Control set with width of 100% and height of 100%. Now I expect that to mean that the report will take up the entire page. Well to my surprise, it does not. In IE7 while it takes the entire width of the page, it only takes up a small portion of the height. In Firefox, both the width and the height are messed up. I have the browser open up a new page that takes up almost all of the screen. Any ideas?

Thanks!

like image 813
Dan Appleyard Avatar asked Apr 22 '09 19:04

Dan Appleyard


People also ask

What is Microsoft ReportViewer?

Description: Microsoft Report Viewer is a software that enables applications that run on the Microsoft . NET Framework to display reports designed using the Microsoft reporting technology.


1 Answers

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

like image 102
Sanchitos Avatar answered Sep 21 '22 22:09

Sanchitos