Freigeben über


FAQ: How do I keep only one vertical scroll bar in local report?

Question

I have a local report with a long height; The problem is that there are two vertical scroll bars on right hand like below. Specially, the scroll wheel does not work on the inner scroll bar. Is there a work around for this?

 

Answer

You can achieve this requirement in local report. Just type in below code in code-behind:

protected void Page_Load(object sender, EventArgs e)

{

    if (!Page.IsPostBack)

{

    .........//other code

 

        this.ReportViewer1.AsyncRendering = false;

        this.ReportViewer1.SizeToReportContent = true;

        this.ReportViewer1.ZoomMode = ZoomMode.FullPage;

 

        .........//other code    

    }

}

 

Then you will get the report like below, you can see that there is only one vertical scroll bar now,  and it will never occur the scenario that the scroll wheel does not work.

  

Applies to

Sql Server Reporting Service2005

Sql Server Reporting Service2008

Sql Server Reporting Service2008 R2