Ely*_*sna 5 stimulsoft asp.net-core
为了在 Asp.net MVC 中获取 Pdf 报告,我正在使用 Stimulsoft 2015。问题是我不知道如何转换我的代码以便在 Asp.net Core 中使用 Stimulsoft Core。似乎 Stimulsoft Core 中的某些功能不再可用(如 StiReport)。
这是在 Asp.net MVC 中运行良好的代码
public ActionResult GetReportSnapshot(string sort)
{
StiReport report = new StiReport();
report.Load(Server.MapPath("~/Reports/Jobs.mrt"));
report["@PrjectId"] = 1;
report["@OrderBy"] = sort;
report.Dictionary.Variables["title"] = new Stimulsoft.Report.Dictionary.StiVariable("title", sort);
report.Render();
MemoryStream stream = new MemoryStream();
report.ExportDocument(StiExportFormat.Pdf, stream);
stream.Position = 0;
FileStreamResult fsr = new FileStreamResult(stream, "application/pdf");
return fsr;
}
Run Code Online (Sandbox Code Playgroud)
我将不胜感激任何帮助。
您使用什么 nuget 软件包?可能是您缺少包含该类的 nuget 包StiReport。(我看到他们将库拆分为多个 nuget 包)
也可能他们还没有将这部分迁移到 dotnet core。我建议您点击 github 存储库,看看是否可以在那里找到任何信息: https: //github.com/stimulsoft或那里的网站。
从 nuget 的外观来看,他们最近才开始迁移到 dotnet core,所以这假设我的第二个建议是正确的建议。

| 归档时间: |
|
| 查看次数: |
1106 次 |
| 最近记录: |