简体   繁体   English

CrystalReportViewer不显示水晶报表

[英]CrystalReportViewer not displaying crystal reports

I am using crystal reports in Visual Studio 2012. I am binding a dataset to it. 我在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();

In the above code, I have checked that the dataset does contain a datatable with records. 在上面的代码中,我检查了数据集是否确实包含带有记录的数据表。 When I try to run my ASP.NET app, the webform does not show any records. 当我尝试运行ASP.NET应用程序时,该Web窗体不显示任何记录。 I have also created a .xsd file with a datatable called "ClientDataTable" and in design time the crystal report is bound to it. 我还创建了一个带有名为“ ClientDataTable”的数据表的.xsd文件,在设计时,该晶体报表已绑定到该文件。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM