//ds1 is the dataset of main report //ds2 is the dataset of sub report //dt1 is the table of main report //dt2 is the table of sub report ds1.Tables.Add(dt1); ds2.Tables.Add(dt2); ds1.WriteXmlSchema("sample1.xml"); ds2.WriteXmlSchema("sample2.xml"); //transefer data to crystalreportviewer CrystalReport1 cr1 = new CrystalReport1();//main report CrystalReport2 cr2 = new CrystalReport2();//sub report cr1.SetDataSource(ds1); cr2.SetDataSource(ds2); crystalReportViewer1.ReportSource = cr1;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)