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.
Date Parameter Giving error
Date Parameter Giving error
- Attachments
-
- StimulError.jpeg (6.75 KiB) Viewed 1051 times
-
- Posts: 7339
- Joined: Tue Mar 20, 2018 5:34 am
Re: Date Parameter Giving error
Hello,
Please send us a sample report with test data that reproduces the issue for analysis.
Thank you.
Please send us a sample report with test data that reproduces the issue for analysis.
Thank you.