Binding a datatable to SAP Crystal Report Dynamically
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.
Use the following code:
ReportDocument rpt = new ReportDocument();
System.Data.DataTable dtReportData = CreateReportData(); //Create and fill this method as needed.
rpt.SetDataSource(dtReportData);
精彩评论