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

Sam Chapman picture Sam Chapman · Apr 19, 2016 · Viewed 7.1k times · Source

I'm having a bit of an issue with the ReportViewer module in C#.

I've added in the report to my website using the instructions provided here: MSDN. It uses the design viewer aspect of visual studio which is horrible to use and seems to have left me without some code I need to get it working.

I am getting this error when I try to load the page:

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

The code added to the page by ReportViewer seems to be (I can't find any other references to ReportViewer):

            <rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" Font-Size="8pt" WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt">
            <LocalReport ReportPath="Pages\Report1.rdlc">
            </LocalReport>
        </rsweb:ReportViewer>

I feel like I'm missing a large amount of code to configure ReportViewer but I can't work out what I'm missing.

I've had a good search for what but couldn't find out what.

Thanks for the help in advance

Answer

bastos.sergio picture bastos.sergio · Apr 19, 2016

Add this to your page...

<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>