ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
ReportViewer1.ShowParameterPrompts = true; Microsoft.Reporting.WebForms.ServerReport serverReport = ReportViewer1.ServerReport;
// Set the report server URL and report path serverReport.ReportServerUrl = new Uri(http://localhost/reportserver2); serverReport.ReportPath = "/BiFile/PVPlayInfoReport";
// Create the sales order number report parameter // Prepare report parameter. Microsoft.Reporting.WebForms.ReportParameter[] paras = new Microsoft.Reporting.WebForms.ReportParameter[3];
paras[0] = new Microsoft.Reporting.WebForms.ReportParameter("ID", "8008"); paras[1] = new Microsoft.Reporting.WebForms.ReportParameter("DatetimeFrom", DateTime.Now.AddMonths(-6).ToShortDateString()); paras[2] = new Microsoft.Reporting.WebForms.ReportParameter("DatetimeTo", DateTime.Now.ToShortDateString());
this.ReportViewer1.ServerReport.SetParameters(paras);