Date Parameter Giving error

Stimulsoft Reports.WEB discussion
Post Reply
yoab
Posts: 5
Joined: Wed Sep 11, 2019 2:26 pm

Date Parameter Giving error

Post 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.
Attachments
StimulError.jpeg
StimulError.jpeg (6.75 KiB) Viewed 1052 times
Lech Kulikowski
Posts: 7339
Joined: Tue Mar 20, 2018 5:34 am

Re: Date Parameter Giving error

Post by Lech Kulikowski »

Hello,

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

Thank you.
Post Reply