Monday, 12 May 2014

The Report Viewer Web Control requires a System.Web.UI.ScriptManager on the web form

The Report Viewer Web Control requires a System.Web.UI.ScriptManager on the web form.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 


Exception Details: Microsoft.Reporting.WebForms.ScriptManagerNotFoundException: The Report Viewer Web Control requires a System.Web.UI.ScriptManager on the web form.

Source Error:
 
[No relevant source lines]

Source File: c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\635ecc26\d3de8e84\App_Web_yzmhqwxw.0.cs    Line:

---------------------------------------------------------------------------------------------------------------------------------------------------

Resolution:


Adding a script manager to the page is easy to do.  Open up your webform (*.aspx file) in visual studio and then go to the toolbox and drag a script manager onto your page.  It should be in the toolbox inside the AJAX Extensions tab.  Doing this will add the following code to your aspx file:
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>

Adding a script manager to the page means that the page will automatically include the necessary javascript files to make the report control work in the browser correctly.

5 comments:

  1. Thanks!
    This helped me a lot!

    Keep up the good work on your blog!

    ReplyDelete
  2. Gooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooood Wooooooooooooooooooooooooooooooooork

    ReplyDelete
  3. I still get the error

    ReplyDelete
  4. still get the error as well

    ReplyDelete