简体   繁体   中英

CrystalReportViewer not displaying crystal reports

I am using crystal reports in Visual Studio 2012. I am binding a dataset to it.

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. I have also created a .xsd file with a datatable called "ClientDataTable" and in design time the crystal report is bound to it.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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