From my win form application i unable to pass int and date time as parameters,when i try to pass , the program giving error.
so here i converted all my parameters as string and pass,but the report is accepting ,int,date time,date time as there parameters from the respective stored procedure.so it generating error report.
string ID = "1 ";
string DateStart= DateTime.Today.AddDays(-1).ToString();
string DateEnd= DateTime.Today.ToString();
rptParameters[0] = new Microsoft.Reporting.WinForms.ReportParameter("@ID", ID);
rptParameters[1] = new ReportParameter("@DateStart", DateStart)
rptParameters[2] = new ReportParameter("@DateEnd", DateEnd);
Is there any solution to pass other than string parameters from winform to SSRS reports.
As you can see by the documentation (and the error message), the parameter value should be a string.
Use
ID.ToString(),DateStart.ToString()andDateEnd.ToString()as your parameters.