private void button1_Click(object sender, EventArgs e) { using (InventoryEntities1 db = new InventoryEntities1()) { StockStatusReport_ResultBindingSource.DataSource = db.StockStatusReport(dtFromDate.Value.ToString(), dtToDate.Value.ToString()).ToList(); Microsoft.Reporting.WinForms.ReportParameter[] rParams = new Microsoft.Reporting.WinForms.ReportParameter[] { new Microsoft.Reporting.WinForms.ReportParameter("FromDate", dtFromDate.Value.Date.ToShortDateString()), new Microsoft.Reporting.WinForms.ReportParameter("ToDate", dtToDate.Value.Date.ToShortDateString()) }; reportViewer1.LocalReport.SetParameters(rParams); reportViewer1.RefreshReport(); } }