Passing parameter to report in Report Viewer
How can I do to pass a parameter to the report? Not windows forms and the parameter is an image array of byte开发者_开发知识库?
I need to do this too, if anyone knows, please!!
Thank you,
var reportParameterCollection = new ReportParameter[3];
reportParameterCollection[0] = new ReportParameter { Name = "StartDate", Values = { DateTime.Now.AddDays(-3).ToShortDateString()} };
reportParameterCollection[1] = new ReportParameter { Name = "EndDate", Values = { DateTime.Now.ToShortDateString() } };
reportParameterCollection[2] = new ReportParameter { Name = "Customer_ID", Values = { 3 } };
reportViewer.ServerReport.SetParameters(reportParameterCollection);
reportViewer.ServerReport.Refresh();
精彩评论