private void SetDataSource(ReportDocument Report) { ReportDataset rptds = new ReportDataset(); ChartOfAccounts clsChartOfAccount = new ChartOfAccounts(); MySqlDataReader myreader = clsChartOfAccount.BalanceSheet("ChartOfAccountID", SortOption.Ascending); clsChartOfAccount.CommitAndDispose(); while (myreader.Read()) { DataRow drNew = rptds.ChartOfAccount.NewRow(); foreach (DataColumn dc in rptds.ChartOfAccount.Columns) { drNew[dc] = "" + myreader[dc.ColumnName]; } rptds.ChartOfAccount.Rows.Add(drNew); } Report.SetDataSource(rptds); SetParameters(Report); }