C# 水晶报表。为何我做的报表只能显示一行数据? 5
PrintCFDprintcfd=newPrintCFD();printcfd.dataGridView1.DataSource=dt2;stringreportPath...
PrintCFD printcfd = new PrintCFD();
printcfd.dataGridView1.DataSource = dt2;
string reportPath = Application.StartupPath.Substring(0, Application.StartupPath.Substring(0, Application.StartupPath.LastIndexOf("\\")).LastIndexOf("\\"));
reportPath += @"\ModuleForms\PatientManage\CrystalReport2.rpt"; //获取报表路径
ReportDocument doc = new ReportDocument();
doc.Load(reportPath);
doc.SetDataSource(dt2);
((TextObject)doc.ReportDefinition.ReportObjects["Text12"]).Text = xm;
((TextObject)doc.ReportDefinition.ReportObjects["Text13"]).Text = ks;
((TextObject)doc.ReportDefinition.ReportObjects["Text14"]).Text = patientid;
((TextObject)doc.ReportDefinition.ReportObjects["Text15"]).Text = treatid;
this.crystalReportViewer1.ReportSource = doc;
我断点跟踪,dt2中有2条数据,但是报表总是显示第一条数据,第二条不显示,为什么?
是每页只显示一条,一共2条,显示在两页上。如何这两条数据都显示在一页上呢??? 展开
printcfd.dataGridView1.DataSource = dt2;
string reportPath = Application.StartupPath.Substring(0, Application.StartupPath.Substring(0, Application.StartupPath.LastIndexOf("\\")).LastIndexOf("\\"));
reportPath += @"\ModuleForms\PatientManage\CrystalReport2.rpt"; //获取报表路径
ReportDocument doc = new ReportDocument();
doc.Load(reportPath);
doc.SetDataSource(dt2);
((TextObject)doc.ReportDefinition.ReportObjects["Text12"]).Text = xm;
((TextObject)doc.ReportDefinition.ReportObjects["Text13"]).Text = ks;
((TextObject)doc.ReportDefinition.ReportObjects["Text14"]).Text = patientid;
((TextObject)doc.ReportDefinition.ReportObjects["Text15"]).Text = treatid;
this.crystalReportViewer1.ReportSource = doc;
我断点跟踪,dt2中有2条数据,但是报表总是显示第一条数据,第二条不显示,为什么?
是每页只显示一条,一共2条,显示在两页上。如何这两条数据都显示在一页上呢??? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询