MVC 5 で使用しようとしStimulSoftReport
ました。stimulsoft デザイナーで .mrt ファイルを設計しました。レポートを印刷するビューがあります。このビュー ファイルには、次のコードが含まれています。
@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);
}
何か問題でもありますか ?:(