How I disable vertical scroll bar of report viewer control on Web Form.

Last post 11-22-2009 12:00 PM by becklery. 10 replies.

Sort Posts:

  • How I disable vertical scroll bar of report viewer control on Web Form.

    06-28-2007, 6:12 AM
    • Member
      38 point Member
    • vaibhav866
    • Member since 04-17-2007, 5:48 AM
    • Posts 22

    I'm displaying .rdlc report file using Report viewer control on Webform. If  I Fix height of viewer control and data is not same as to size of viewer control then it display one scrollbar on viewer control and second vertical scroll bar is coming on webpage.

     I want to off viewer vertical scrollbar or in simple word's I don't want to display two scroll bar with my report. Please guide me or send me reference if any.

    Thanks,

    Vaibhav Jain
  • Re: How I disable vertical scroll bar of report viewer control on Web Form.

    06-28-2007, 8:34 AM
    • All-Star
      21,137 point All-Star
    • bullpit
    • Member since 06-29-2006, 3:59 PM
    • Posts 4,670

    You to set two properties to make the repoertviewer autosize:

    AsyncRendering = false;

    and

    SizeToReportContent = true;

  • Re: How I disable vertical scroll bar of report viewer control on Web Form.

    04-22-2008, 2:34 PM
    • Member
      193 point Member
    • nick5454
    • Member since 02-07-2004, 1:06 AM
    • Posts 183

    By the way that solution doesn't work :(

  • Re: How I disable vertical scroll bar of report viewer control on Web Form.

    09-24-2008, 3:51 PM
    • Member
      2 point Member
    • greenerist
    • Member since 09-24-2008, 7:48 PM
    • Posts 2

    Here's what I did to remove the vertical scrollbar.

    1. Set the webpart height to 800px (or whatever suits your needs).
    2. Locate the Div ID that wraps around the web part (example: #ctl00_ctl10_g_002108f3_8e9e_47f6_aa29_dce37c6009)
    3. In a stylesheet like master.css add this line at the bottom:

    #ctl00_ctl10_g_002108f3_8e9e_47f6_aa29_dce37c6009 {
     overflow: hidden !important;
    }

  • Re: How I disable vertical scroll bar of report viewer control on Web Form.

    10-04-2008, 2:59 AM

    AsyncRendering = false; and SizeToReportContent = true; it is working fine but navigation feature is not working

    bye

    narasimha

  • Re: How I disable vertical scroll bar of report viewer control on Web Form.

    11-13-2008, 6:34 AM
    • Member
      4 point Member
    • rmandal
    • Member since 11-03-2008, 11:17 AM
    • mumbai
    • Posts 2

    Even I had the same problem.. Angry

    by doing the following stuff works here,

    AsynRendering="true",Width="100%",Height="Whatever u want", ** style="margin-bottom:30px(in mine case)"

    Hope it help u too ...Smile

    regards,

    Ranu N. Mandan
  • Re: How I disable vertical scroll bar of report viewer control on Web Form.

    08-21-2009, 4:04 PM
    • Member
      10 point Member
    • pabloah
    • Member since 06-11-2007, 6:48 PM
    • Posts 5

    This made the trick for me, great and simple idea!

    thanks !


    rmandal:

    Even I had the same problem.. Angry

    by doing the following stuff works here,

    AsynRendering="true",Width="100%",Height="Whatever u want", ** style="margin-bottom:30px(in mine case)"

    Hope it help u too ...Smile


  • Re: How I disable vertical scroll bar of report viewer control on Web Form.

    08-21-2009, 6:03 PM
    • Member
      193 point Member
    • nick5454
    • Member since 02-07-2004, 1:06 AM
    • Posts 183

    pabloah:

    This made the trick for me, great and simple idea!

    thanks !


    rmandal:

    Even I had the same problem.. Angry

    by doing the following stuff works here,

    AsynRendering="true",Width="100%",Height="Whatever u want", ** style="margin-bottom:30px(in mine case)"

    Hope it help u too ...Smile


     

     

    Once you use a complex report you'll realize it doesn't solve the issue.

     

    It's a bug in Microsoft's horribly ugly control. It's really surprising that MS out something like that. 

     

    We contacted support and they told us it's bug and there isn't any plan of fixing it as of now.

     

    Nick

  • Re: How I disable vertical scroll bar of report viewer control on Web Form.

    11-06-2009, 5:33 PM
    • Member
      2 point Member
    • carlcom
    • Member since 11-06-2009, 10:12 PM
    • Posts 1

    greenerist:

    Here's what I did to remove the vertical scrollbar.

    1. Set the webpart height to 800px (or whatever suits your needs).
    2. Locate the Div ID that wraps around the web part (example: #ctl00_ctl10_g_002108f3_8e9e_47f6_aa29_dce37c6009)
    3. In a stylesheet like master.css add this line at the bottom:

    #ctl00_ctl10_g_002108f3_8e9e_47f6_aa29_dce37c6009 {
     overflow: hidden !important;
    }

     

    I needed a similar but different solution. Report viewer in an aspx page with just one hyperlink above the RV had 

    Width="100%" Height="100%" AsyncRendering="false" SizeToReportContent="true"

     but the report data almost always had scrollbars in addition to the browser's.  Using F12 in IE8 I found the div with overflow:auto causing the problem with an ID like P04d35da423884a1e8480cc04e7080509oReportDiv but the guid part changed so I added

    <script language="JavaScript" type="text/JavaScript">

     window.onload=

    function setstart(){

     var els = document.getElementsByTagName('div');

    var i = els.length;

    while ( i-- )

    if( els[i].id.indexOf('ReportDiv') > 0 )

    els[i].style.overflow = 'visible';

    }

     </script>

    and FINALLY it looks right.

     

     

  • Re: How I disable vertical scroll bar of report viewer control on Web Form.

    11-15-2009, 1:15 PM
    • Member
      8 point Member
    • shyjuvs
    • Member since 10-04-2007, 2:40 PM
    • Posts 4

    http://tech-days.blogspot.com/2009/11/sql-server-report-viewer-autosize.html

  • Re: How I disable vertical scroll bar of report viewer control on Web Form.

    11-22-2009, 12:00 PM
    • Member
      136 point Member
    • becklery
    • Member since 04-12-2009, 2:50 AM
    • Posts 65

    Hi,

    Adjust the report borders means try to avoid the blank space between your design envirronment and report borders. If you are not properly adjust these borders it may take more space for report while rendering, because of this you will get scroll bars in the report. 

Page 1 of 1 (11 items)