How to solve unknown Server tag "rsweb:ReportViewer"

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'.

1

2 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.

0

At 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).

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like