Crystal报表未显示任何记录甚至没有加载报表标题

时间:2017-08-24 05:33:34

标签: c# asp.net crystal-reports

我的代码是:

string rptPath = AppDomain.CurrentDomain.BaseDirectory + "EMSDasbaordReport\\DeductionReports\\DetailedDeductionRpt.rpt";
                rprt.Load(rptPath);
                SqlDataAdapter da = new SqlDataAdapter(cmd);
                DataSet ds= new DataSet();
                da.Fill(ds);
                DataTable UPTO_Table = new DataTable();
                UPTO_Table = ds.Tables[0];
                UPTO_Table.TableName = "UPTORecordtbl";                
                DataTable Check_in_Table = new DataTable();
                Check_in_Table = ds.Tables[1];
                Check_in_Table.TableName = "CheckInRecordtbl";
                DataTable Worklog_Table = new DataTable();
                Worklog_Table = ds.Tables[2];
                Worklog_Table.TableName = "WorkLogRecordtbl";
                rprt.SetDataSource(UPTO_Table);
                rprt.Subreports[0].SetDataSource(UPTO_Table);
                rprt.Subreports[1].SetDataSource(Check_in_Table);
                rprt.Subreports[2].SetDataSource(Worklog_Table);
                Session["DetailedReport"] = rprt;
                DetailedDeductionRpt.ReportSource = rprt;

我得到一张空白的水晶报告。我的数据集“dsdeductionReport.xsd”中有三个表,名称相同。我的报告是从我的数据集的这些表中获取数据。

0 个答案:

没有答案