So I have a report that is being generated that contains parameters.
ReportParameter cvrParameter = new ReportParameter("cvrParameter", companyCVR);
ReportParameter companyNameParameter = new ReportParameter("companyNameParameter", company.CompanyName);
ReportParameter companyAddressParameter = new ReportParameter("companyAddressParameter", company.Address);
ReportParameter companyCityParameter = new ReportParameter("companyCityParameter", company.City);
ReportParameter studentCityParameter = new ReportParameter("studentCityParameter", student.City);
ReportParameter studentNameParameter = new ReportParameter("studentNameParameter", student.FirstName+" "+student.LastName);
ReportParameter studentAddressParameter = new ReportParameter("studentAddressParameter", student.Address);
ReportParameter studentZipCodeParameter = new ReportParameter("studentZipCodeParameter", student.ZipCode);
ReportParameter jobStartDateParameter = new ReportParameter("jobStartDateParameter", projectobj.StartDate);
ReportParameter jobEndDateParameter = new ReportParameter("jobEndDateParameter", projectobj.EndDate);
ReportParameter jobDescriptionParameter = new ReportParameter("jobDescriptionParameter", projectobj.Description);
ReportParameter jobHoursPerWeekParameter = new ReportParameter("jobHoursPerWeekParameter", projectobj.HoursPerWeek.ToString());
ReportParameter jobHourlyRateParameter = new ReportParameter("jobHourlyRateParameter", projectobj.HourlyRate.ToString());
ReportParameter cprParameter = new ReportParameter("cprParameter", studentCPR);
ReportParameter studentSignDateParameter = new ReportParameter("studentSignDateParameter", DateTime.Today.ToString("dd/MM/yyyy"));
ReportParameter companySignDateParameter = new ReportParameter("companySignDateParameter", contractobj.CompanySigningDate);
ReportParameter companyRepNameParameter = new ReportParameter("companyRepNameParameter", contractobj.RepFirstName +" "+contractobj.RepLastName);
ReportParameter projectWorkFromParameter = new ReportParameter("projectWorkFromParameter", projectobj.WorkFrom);
localReport.SetParameters(new ReportParameter[] { cprParameter });
localReport.SetParameters(new ReportParameter[] { cvrParameter });
localReport.SetParameters(new ReportParameter[] { companyNameParameter });
localReport.SetParameters(new ReportParameter[] { companyAddressParameter });
localReport.SetParameters(new ReportParameter[] { studentNameParameter });
localReport.SetParameters(new ReportParameter[] { studentAddressParameter });
localReport.SetParameters(new ReportParameter[] { studentZipCodeParameter });
localReport.SetParameters(new ReportParameter[] { jobStartDateParameter });
localReport.SetParameters(new ReportParameter[] { jobEndDateParameter });
localReport.SetParameters(new ReportParameter[] { jobDescriptionParameter });
localReport.SetParameters(new ReportParameter[] { jobHoursPerWeekParameter });
localReport.SetParameters(new ReportParameter[] { jobHourlyRateParameter });
localReport.SetParameters(new ReportParameter[] { studentSignDateParameter });
localReport.SetParameters(new ReportParameter[] { companySignDateParameter });
localReport.SetParameters(new ReportParameter[] { companyRepNameParameter });
localReport.SetParameters(new ReportParameter[] { projectWorkFromParameter });
localReport.SetParameters(new ReportParameter[] { companyCityParameter });
localReport.SetParameters(new ReportParameter[] { studentCityParameter });
The parameters are set from the controller as seen above.
I've added all the parameters in my report data and everything else works, but not the 'studentSignDateParameter'.
tried to specify from the parameter's proprieties that it is a date but I get the same result. "companySignDateParameter" works just fine and it is a string of a date.
I've also tried giving the parameter a random value, a string or whatever and still this error persists. I don't think it has to do with the code, as Visual Studio detects no errors.
Any ideas? what could possibly the problem with that parameter? I've deleted it and remade it but nothing changes.