Page 1 of 1

Date Parameter Giving error

Posted: Mon Oct 21, 2019 6:30 pm
by yoab
Hello,
I am using dotnet core reporting with parameters. All works well using integers as parameter value but a date gives me an error.
below is my code:

report.Load(Path.Combine(_hostingEnvironment.WebRootPath + $@"\Reports\FinanceSummary.mrt"));
((StiPostgreSQLDatabase)report.Dictionary.Databases["FMCYolaConnection"]).ConnectionString = connectionString;
report.DataSources["PaymentDetails"].Parameters["StartDate"].Value = Convert.ToDateTime(_session.GetString("sd")).ToString("MM/dd/yyyy");
report.DataSources["PaymentDetails"].Parameters["EndDate"].Value = Convert.ToDateTime(_session.GetString("ed")).ToString("MM/dd/yyyy");

I have successfully used :

report.Load(Path.Combine(_hostingEnvironment.WebRootPath + $@"\Reports\RadiologyReceipt.mrt"));
((StiPostgreSQLDatabase)report.Dictionary.Databases["FMCYolaConnection"]).ConnectionString = connectionString;
report.DataSources["RadInfo"].Parameters["PId"].Value = pid;
report.DataSources["RadiologyRequests"].Parameters["PId"].Value = pid;

where pid is a sessioon string variable. attached is the error i receive and in the report the variable is a date type, the preview in the report works perfectly, only when I try to render on dotnet core do I see the problem.

Re: Date Parameter Giving error

Posted: Wed Oct 23, 2019 7:32 am
by Lech Kulikowski
Hello,

Please send us a sample report with test data that reproduces the issue for analysis.

Thank you.