【问题标题】:CrystalReportViewer not displaying crystal reportsCrystalReportViewer 不显示水晶报表
【发布时间】:2023-03-02 23:09:01
【问题描述】:

我在 Visual Studio 2012 中使用水晶报表。我正在将数据集绑定到它。

public class Client
{
    public string Name { get; set; }
    public List<Patient> Patients { get; set; }
}
public class Patient
{
    [Key]
    public int PatientID { get; set; }
    public string Name { get; set; }
}
ClientReport clReport = new ClientReport(); //(CrystalReport instance)
clReport.Database.Tables["ClientDataTable"].SetDataSource(clientDS.Tables[0]);
CrystalReportViewer1.ReportSource = clReport;
CrystalReportViewer1.DataBind();

在上面的代码中,我检查了数据集确实包含带有记录的数据表。当我尝试运行我的 ASP.NET 应用程序时,网络表单不显示任何记录。 我还创建了一个 .xsd 文件,其中包含一个名为“ClientDataTable”的数据表,并且在设计时将水晶报表绑定到它。

【问题讨论】:

    标签: c# asp.net crystal-reports


    【解决方案1】:

    我必须将“aspnet_client”文件夹从“C:\inetpub\wwwroot”位置复制到我的 asp.net 应用程序文件夹的根目录。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多