2
對於Asp.net MVC獲得PDF格式的報告,我有Stimulsoft 2015年問題的工作是,我不知道如何將我的代碼轉換,以便與Stimulsoft核心在Asp.net的核心工作。似乎有些功能在Stimulsoft Core中不再可用(如StiReport)。
這是在Asp.net MVC正常工作Migirating到Stimulsoft核心
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;
}
我會感謝所有幫助的代碼。
我使用stimulsoft核心NuGet包,並且只有一個包中的NuGet包管理器.NET的核心。我認爲他們已經完成了核心版本,但似乎他們仍在努力 –