I have created ssrs report. Now i want to call that report in my aspx page. I have used following code for this purpose.
<rsweb:ReportViewer runat="server" CssClass="rpviewerparm" BackColor="#60759B"> </rsweb:ReportViewer>but i get the below error: unknown server tag 'rsweb:Reportviewer'.
12 Answers
you have to register Assembly for working with report viewer control
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>Add it just below page directive.
0At the top of your ASPX page yo have to add the reference to the assembly (Register it):
<%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %>Also if you plan to add server side code you have to add using Microsoft.Reporting.WebForms;
Note: If you cant find any of these references you should go to your solution exlorer -> right click on references -> Add reference and look for Microsoft.ReportViewer.WebForms and add it (MS Visual Studio).