2

I am working on a web application project and I am using Visual Studio 2019, and when I reach the point I need to make a report wising RDLC report I install the report viewer using this command

    Install-Package Microsoft.ReportingServices.ReportViewerControl.WebForms -Version 150.1400.0

Then I follow all the instruction in this page exactly

https://learn.microsoft.com/en-us/sql/reporting-services/application-integration/integrating-reporting-services-using-reportviewer-controls-get-started?view=sql-server-ver15 in the webform i add the following

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="Sample" %>

<%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="X-UA-Compatible" content="IE=edge" /> 
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager runat="server"></asp:ScriptManager>        
        <rsweb:ReportViewer ID="ReportViewer1" runat="server" ProcessingMode="Remote">
            <ServerReport ReportServerUrl="https://AContosoDepartment/ReportServer" ReportPath="/LatestSales" />
        </rsweb:ReportViewer>
    </form>
</body>
</html>

when I compile the project I got this error

Error BC30002   Type 'Global.Microsoft.Reporting.WebForms.ReportViewer' is not defined.

I review the reference many times and the DLL file exists and all the assembly defined

ehab elfallah
  • 21
  • 1
  • 4

1 Answers1

0

Thanks to everyone tried to help me

I used ReportViewr for MVC instead and it's work fine

ehab elfallah
  • 21
  • 1
  • 4