protected void BindReportDataSource() { DateTime start = Convert.ToDateTime(this.StartDate.Text); DateTime end = Convert.ToDateTime(this.EndDate.Text); string center = (this.Center.Text).ToString(); string station = (this.Station.Text).ToString(); string start1 = start.ToString(); string end1 = end.ToString(); this.ReportViewer1.LocalReport.DataSources.Clear(); this.ReportViewer1.LocalReport.ReportPath = Server.MapPath(@"~/Reports/TJ_CLCDFS.rdlc"); Microsoft.Reporting.WebForms.ReportParameter st = new Microsoft.Reporting.WebForms.ReportParameter("StartTime", start1); Microsoft.Reporting.WebForms.ReportParameter ed = new Microsoft.Reporting.WebForms.ReportParameter("EndTime", end1); this.ReportViewer1.LocalReport.SetParameters(new Microsoft.Reporting.WebForms.ReportParameter[] { st, ed }); TJDAL dal = new TJDAL(); DataTable dt = dal.Get_TJ_CLCDFS(start, end, center, station); this.ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("DataSetForTJ_CLCDFS", dt)); this.ReportViewer1.LocalReport.Refresh(); }