ReportViewer with heigh=100%

When you try to assign the web reportviewer control to a height of 100%, it displays as a very short (height wise) format.  For me, adding the style attributes to the form did the trick.

The solution to this problem was found on this page: http://msdn2.microsoft.com/en-us/library/ms252090.aspx.

Considerations for XHTML and ReportViewer Web Server Control

If you configure the ReportViewer Web server control to run in asynchronous mode in an application that is written in XHTML, you must follow specific steps to display the ReportViewer control properly. If the ReportViewer control uses relative height (for example, if the height is specified as a percentage of available space), the control collapses to a height of 0 pixels as a result of how frames and DIV tags render in containing tables in XHTML. You can avoid this problem by using one of the following workarounds:

  • Explicitly set the height on the on the ReportViewer control to an actual value rather than a percentage.

  • Add the following style setting to the head tag:

    <style>html,body,form {height:100%}</style>.

    By forcing the html, body and form tags to maximum height, the frame used in the ReportViewer control will also grow to maximum height, making it visible on the page.

  • Remove the xhtml doctype from the page.

Advertisement

One thought on “ReportViewer with heigh=100%

  1. Hi

    i m using master page so what is the solution for setting the reportviewer height which comes under content page

    please help me out to fix this issue.
    Note:- i am facing this issue only in IE browser. In chrome it is working fine with out any change.

    Thanks

    pappu roy

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s