protected void BindReportDataSource() { DateTime start = Convert.ToDateTime(this.StartDate.Text); DateTime end = Convert.ToDateTime(this.EndDate.Text); string telNumber = (this.TelNumber.Text).ToString(); string disposeResult = (this.HiddenForResult.Value).ToString(); string start1 = start.ToString(); string end1 = end.ToString(); this.ReportViewer1.LocalReport.DataSources.Clear(); this.ReportViewer1.LocalReport.ReportPath = Server.MapPath(@"~/Reports/TJ_LDJL.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_LDJL(start, end, telNumber, disposeResult); this.ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("DataSetForTJ_LDJL", dt)); this.ReportViewer1.LocalReport.Refresh(); }