How to set datasource of Sub crystal report in c# win form app
ReportDocument cryRpt = new ReportDocument();
cryRpt.Load("C:/MainReport.rpt");
cryRpt.DataSourceConnections.Clear();
cryRpt.SetDataSource(ds.Tables[0]);
cryRpt.Subreports[0].DataSourceConnections.Clear();
cryRpt.Subreports[0].SetDataSource(ds.Tables[0]);
crystalReportViewer1.ReportSource = cryRpt;
crystalReportViewer1.Refresh();