private void btnLoad_Click(object sender, EventArgs e) { MyDataSetTableAdapters.GetDataReportTableAdapter ta = new MyDataSetTableAdapters.GetDataReportTableAdapter(); MyDataSet.GetDataReportDataTable dt = new MyDataSet.GetDataReportDataTable(); ta.Fill(dt); ReportDataSource rds = new ReportDataSource(); rds.Name = "DataSet1"; rds.Value = dt; ReportParameter rp1 = new ReportParameter("fromDate", dtFromDate.Value.Date.ToShortDateString()); ReportParameter rp2 = new ReportParameter("toDate", dtToDate.Value.Date.ToShortDateString()); ReportViewer1.LocalReport.DataSources.Clear(); ReportViewer1.LocalReport.ReportPath = "Report.rdlc"; ReportViewer1.LocalReport.SetParameters(rp1); ReportViewer1.LocalReport.SetParameters(rp2); ReportViewer1.LocalReport.DataSources.Add(rds); ReportViewer1.LocalReport.Refresh(); ReportViewer1.RefreshReport(); }
ta.Fill(dt)
dt
I Resolved The Issue by Creating new Stored Procedure and accessing data from it. ta.Fill(dt,dtFromDate.Value.ToShortDateString(),dtToDate.Value.ToShortDateString()); this changes should be done while autobinding datasource to reportviewer.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)