我在Crystal报表中有一个主报表和两个子报表,但是在子报表中未显示数据集数据源在C#中是不同的

时间:2019-06-12 11:38:27

标签: crystal-reports report

所有子报表都作为空白报表添加到此Crystal报表中。

问题是数据不在子报表中显示,而仅在主报表中显示

rdreport.Load("C:/INTRANET/Project_Rollout_Management.rpt");
rdreport.Database.Tables[0].SetDataSource(ds1.Tables["Project_rollout_Management"]);

//rdreport.Load("C:/inetpub/wwwroot/INTRANET/Service_LOI_Agreement.rpt");


//rdreport.OpenSubreport("C:/inetpub/wwwroot/INTRANET/Service_LOI_Agreement.rpt").SetDataSource(ds_LOI);
if (ds1.Tables[0].Rows.Count > 0)
{
   rdreport.SetDataSource(ds1.Tables[0]);// Main report 
   rdreport.Subreports[0].SetDataSource(ds_LOI.Tables[0]);  // Subreport
   rdreport.Subreports[1].SetDataSource(ds_PnL.Tables[0]); 

   rptReport_ProjectRolloutMngnt.ReportSource = rdreport;

0 个答案:

没有答案
相关问题