我試圖在MVC 5中使用StimulSoftReport
。我在stimulsoft設計器中設計了一個.mrt文件。我有一個打印報告的觀點。 此視圖文件包含以下代碼:Stimulsoft報告不加載MVC查看
@using Stimulsoft.Report.Mvc;
@{
ViewBag.Title = "چاپ قبض";
Layout = null;
}
@Html.Stimulsoft().StiMvcViewer(
"MvcViewerReport",
new Stimulsoft.Report.Mvc.StiMvcViewerOptions()
{
ActionGetReportSnapshot = "GetReportSnapshot",
ActionViewerEvent = "ViewerEvent"
})
位於相同的控制器和GetReportSnapshot
ViewerEvent
打印動作。但是當顯示打印視圖。它只是有報告查看器的工具欄,並沒有顯示我的記者,即使我創建了一個斷點,我發現上述操作都沒有從視圖中調用。
這裏是GetReportSnapshot
代碼:
public ActionResult GetReportSnapshot()
{
DataSet dataset = new DataSet();
dataset.ReadXmlSchema(Server.MapPath("~/Content/report/BillXmlFile.xsd"));
StiReport report = new StiReport();
report.Load(Server.MapPath("~/Content/report/Report.mrt"));
report.Dictionary.ImportXMLSchema(dataset);
report.Compile();
return StiMvcViewer.GetReportSnapshotResult(HttpContext, report);
}
這裏是ViewerEvent
代碼:
public ActionResult ViewerEvent()
{
return StiMvcViewer.ViewerEventResult(HttpContext);
}
這是怎麼回事? :(