I want to use stimulsoft in a project written in ASP.NET MVC .Net6. StimulSoft version is 2022.1.1 and I installed NuGet
Stimulsoft.Reports.Web.NetCore
in my project.
Controller:
...
public IActionResult PrintPage()
{
return View();
}
public IActionResult GetReport()
{
StiReport report = new StiReport();
report.Load(StiNetCoreHelper.MapPath(this, "wwwroot/Reports/sample1.mrt"));
var list = _unitOfWork.RefereeTypeRepos.GetAll(); //Get information for print.
report.RegData("DT", list);
return StiNetCoreViewer.GetReportResult(this, report);
}
public IActionResult ViewerEvent()
{
return StiNetCoreViewer.ViewerEventResult(this);
}
PrintPage.cshtml:
@using Stimulsoft.Report.Mvc
@using Stimulsoft.Report.Web
@Html.StiNetCoreViewer(new StiNetCoreViewerOptions()
{
Actions =
{
GetReport = "GetReport",
ViewerEvent = "ViewerEvent"
}
})
When the page loads, I get this Error:
I don't know what I should do, and which version or NuGet is proper for .Net6? I appreciate somebody answers.