C# 无法在rdlc报表asp.net上显示数据

C# 无法在rdlc报表asp.net上显示数据,c#,asp.net,visual-studio-2017,reportviewer,C#,Asp.net,Visual Studio 2017,Reportviewer,我正在使用存储过程和报表的详细信息。我正在使用报表查看器和数据集;但是,我似乎在aspx文件中遇到了一个错误: 创建控件时出错-ReportViewer1无法创建设计器 'Microsoft.Reporting.WebForms.ReportViewer, Microsoft.ReportViewer.WebForms,版本=11.0.0.0,区域性=中性, PublicKeyToken=89845dcd8080cc91' 但当我执行时,它只显示这一点,而没有报告的细节 图片: html 我做

我正在使用存储过程和报表的详细信息。我正在使用报表查看器和数据集;但是,我似乎在aspx文件中遇到了一个错误:

创建控件时出错-ReportViewer1无法创建设计器 'Microsoft.Reporting.WebForms.ReportViewer, Microsoft.ReportViewer.WebForms,版本=11.0.0.0,区域性=中性, PublicKeyToken=89845dcd8080cc91'

但当我执行时,它只显示这一点,而没有报告的细节

图片:

html


我做了一些研究,但似乎无法找出我做错了什么。

哪一行引发了异常,您是否正在尝试从以前的版本升级
ReportViewer
?您可能应该查看web.config和包管理器,以确保没有发生冲突。@TetsuyaYamamoto,没有引发异常,我也没有升级reportviewer
    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Report.aspx.cs" Inherits="Student_Report" %>

<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>







<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Student Report</title>
</head>
<body>
    <form id="form1" runat="server" style="text-align: center">
        <h1 style="font-family: 'Comic Sans MS'; text-align: center; font-size: xx-large;">Student Report
        </h1>

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


    </form>
</body>
</html>
if (!IsPostBack)
    {
        string strSQLconstring = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ToString();
        ReportViewer1.ProcessingMode = ProcessingMode.Local;
        //report path
        ReportViewer1.LocalReport.ReportPath = Server.MapPath("~/Report.rdlc");
        SqlDataAdapter adp = new SqlDataAdapter("sp_StudentData", strSQLconstring);
        adp.SelectCommand.CommandType = CommandType.StoredProcedure;
        //object of Dataset DemoDataSet
        TWCL_OPERATIONSDataSet ds = new TWCL_OPERATIONSDataSet();
        adp.Fill(ds, "sp_StudentData");
        //Datasource for report
        ReportDataSource datasource = new ReportDataSource("DataSet1", ds.Tables[0]);
        ReportViewer1.Width = 2000;

        ReportViewer1.LocalReport.DataSources.Clear();
        ReportViewer1.LocalReport.DataSources.Add(datasource);
        ReportViewer1.LocalReport.Refresh();
    }