0
votes

I wish to add single crystal report to my project and a datatable (or dataset). The Datatable is being populated as per dynamic SQLs and each time the columns (datatable schema) in my datatable change. I wish to bind this datatable (or dataset) to the crystal report and as my SQLs change the report should change. Kindly help me to achieve this.

Thanks in advance

Sap Crystal Reports, version for Visual studio 2010 V13.01.1.220 is being used.

1

1 Answers

0
votes

Use the following code:

ReportDocument rpt = new ReportDocument();
System.Data.DataTable dtReportData = CreateReportData(); //Create and fill this method as needed.
rpt.SetDataSource(dtReportData);