【发布时间】:2022-11-12 13:08:36
【问题描述】:
我想在一个项目中使用 stimulsoftASP.NET MVC .Net6. StimulSoft 版本是 2022.1.1,我安装了 NuGet
Stimulsoft.Reports.Web.NetCore
在我的项目中。
控制器:
... 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); }打印页面.cshtml:
@using Stimulsoft.Report.Mvc @using Stimulsoft.Report.Web @Html.StiNetCoreViewer(new StiNetCoreViewerOptions() { Actions = { GetReport = "GetReport", ViewerEvent = "ViewerEvent" } })我不知道我应该做什么,哪个版本或 NuGet 适合 .Net6? 我感谢有人回答。
【问题讨论】:
-
我的问题有什么问题,有人投票反对我?
-
我搜索了很多并尝试了许多不同的代码。而不是'report.load'我使用'report.loadducument'错误消失了,但只显示一个空页面,使用Stimulsoft的试用版。
标签: c# asp.net-mvc .net-6.0 stimulsoft