PageReport CurrRpt = reportDesigner.Report as PageReport;
DataSource GdataSource = new DataSource();
GdataSource.Name = "DsSour";
GdataSource.ConnectionProperties.DataProvider = "DATASET";
GrapeCity.ActiveReports.PageReportModel.DataSet GdataSet = new GrapeCity.ActiveReports.PageReportModel.DataSet();
Query Gquery = new Query();
GdataSet.Name = "tab1";
Gquery.DataSourceName = GdataSource.Name;
Gquery.CommandType = QueryCommandType.Text;
GdataSet.Query = Gquery;
Field Zdfield = new Field("ZD1", "ZD1", null);
GdataSet.Fields.Add(Zdfield);
CurrRpt.Report.DataSources.Add(GdataSource);
CurrRpt.Report.DataSets.Add(GdataSet);
reportExplorer.ReportDesigner = reportDesigner; |