2015-04-06 78 views
0

我試圖在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" 

}) 

位於相同的控制器和GetReportSnapshotViewerEvent打印動作。但是當顯示打印視圖。它只是有報告查看器的工具欄,並沒有顯示我的記者,即使我創建了一個斷點,我發現上述操作都沒有從視圖中調用。

這裏是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); 
     } 

這是怎麼回事? :(

回答

0

你不用數據傳遞到報告。它僅僅是架構。通常情況下,數據集與REGDATA()方法進行註冊。

0

我不知道你能解決您的問題或沒有?但我最近遇到了和你一樣的問題,我正在使用mvc 5.2.3,我使用了Google搜索,但找不到合適的解決方案,所以我猜想它需要更改.dll版本。 我將dll更改爲Stimulsoft.Suite.2015.2。零售和問題已得到解決。

希望這對您有所幫助