0
當我與Windows Form Application C#
一起工作。報告使用Stimulsoft並使用此代碼顯示查看報告數據。使用Stimulsoft在Asp.net核心中報告數據
StiReport rpt2 = new StiReport();
rpt2.Load(Application.StartupPath + "\\RPT\\RPTListPoorsantNamayandeh.mrt");
rpt2.Compile();
rpt2["namayandeh"] = comboPoorsantNamayandeh.Text;
rpt2["StTarikh"] = StTarikh;
rpt2["EnTarikh"] = EnTarikh;
rpt2["tarikhGozaresh"] = tarikhGozaresh;
rpt2["GozareshCode"] = GozareshCode;
rpt2.RegData(dtRPTPoorsant);
rpt2.Render();
rpt2.Show();
上面的代碼是真實的,現在我用Asp.net核心合作報告,我想用Stimulsoft。在下方顯示的報告文件中的示例數據,但我不不,我怎麼能發送數據集或數據表或模式到MRT文件
控制器:
public IActionResult GetReport()
{
string reportString = System.IO.File.ReadAllText(_hostEnvironment.WebRootPath + "\\Reoprt\\ParametersSelectingCountry.mrt");
return StiNetCoreViewer.GetReportResult(this, reportString);
}
public IActionResult ViewerEvent()
{
return StiNetCoreViewer.ViewerEventResult(this);
}
index.chstml
@using Stimulsoft.Report.NetCore
@Html.Stimulsoft().StiNetCoreViewer("NetCoreViewver1",new StiNetCoreViewerOptions()
{
Actions =
{
GetReport = "GetReport",
ViewerEvent = "ViewerEvent"
}
})
此鏈接爲asp.net mvc。但我不知道如何在asp.net核心1.1中做到這一點 –