Report Viewer height 100% not working

5 posts, 0 answers
  1. Regeesh Joseph
    Regeesh Joseph avatar
    55 posts
    Member since:
    May 2010

    Posted 12 Oct 2010 Link to this post


    I have created one Telerik Report. I set the height of the report viewer as 100% in aspx page. In my development PC, it is showing properly. But in deployment, it shows only 40% of the screen height. There is a scroll bar to scroll down evenif the data is small to display on one page. No need to show the scrollbar, if the data can be shown on one page. I have attached the screenshot of the page. Please send me a solution as soon as possible. Its very urgent..Please.

    Thanks & regards,
    Regeesh Joseph
  2. Steve
    Steve avatar
    10941 posts

    Posted 15 Oct 2010 Link to this post

    Hi Regeesh Joseph,

    If this works properly on your dev machine, it should function on another machine as well as the height is controlled in the html markup. See this help article for more information: How do I set 100% height to the Web Report Viewer.

    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Travis
    Travis avatar
    223 posts
    Member since:
    Jan 2003

    Posted 15 Mar 2011 Link to this post

    Telerik's solution did not work for me.  My problem was that I had some content on the page which was a header to the report viewer control.  If I set the height of the report viewer and its container to be 100%, then it ends up being longer/higher than the page height in IE 8.  I couldn't seem to find a way to set the report viewer to be "the rest" of the window height using "100%" or css.  The javascript code below which gets the client window height was a better solution for me.  Maybe it will work for someone else as well:

    <div id="ReportViewerDiv">
        <telerik:ReportViewer ID="MyReportViewer" runat="server" Width="100%" Height="100%">
        <script language="javascript">
            function GetWindowHeight() {
                var y = 0;
                var minHeight = 200; //min height of the report viewer control
                var heightOffset = 385; //this is the height of the rest of the page excluding the report viewer.  You can determine this by getting the client height of a container or set it statically
                if (self.innerHeight) {
                    y = self.innerHeight;
                else if (document.documentElement && document.documentElement.clientHeight) {
                    y = document.documentElement.clientHeight;
                else if (document.body) {
                    y = document.body.clientHeight;
                if ((y - heightOffset) > minHeight)
                    document.getElementById("ReportViewerDiv").style.height = (y - heightOffset) + "px";
                    document.getElementById("ReportViewerDiv").style.height = minHeight + "px";
  4. danparker276
    danparker276 avatar
    389 posts
    Member since:
    Aug 2010

    Posted 31 Aug 2012 Link to this post

    Neither solution works for me.  Gotta love HTML and javascript!
  5. Paul R.
    Paul R. avatar
    12 posts
    Member since:
    Apr 2010

    Posted 21 Sep 2012 Link to this post

    Travis, thank you for your post, that fixed my issue with the report shrinkage!
Back to Top