C# 使用Stimulsoft在Asp.net core中报告数据

C# 使用Stimulsoft在Asp.net core中报告数据,c#,asp.net-core,stimulsoft,C#,Asp.net Core,Stimulsoft,当我使用Windows窗体应用程序C#进行报告时,请使用此代码显示查看报告数据 StiReport rpt2 = new StiReport(); rpt2.Load(Application.StartupPath + "\\RPT\\RPTListPoorsantNamayandeh.mrt"); rpt2.Compile(); rpt2["namayandeh"] = comboPoorsantNamayandeh.Text; rpt2["StTarikh"] = StTarikh; rp

当我使用
Windows窗体应用程序C#
进行报告时,请使用此代码显示查看报告数据

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 core来报告我想要使用的数据。在下面的示例中显示报告文件,但我不知道如何将数据集、数据表或模型发送到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"
    }
})
  • .NET Core 1.x不支持
    数据表
    s或
    数据集
    s。它们将添加到v2.x中
  • RegData
    接受
    DataTable
    。用于传递列表
      • .NET Core 1.x不支持
        数据表
        s或
        数据集
        s。它们将添加到v2.x中
      • RegData
        接受
        DataTable
        。用于传递列表

      此链接适用于asp.net mvc。但是我不知道如何在asp.net core 1.1中使用它。如何在asp.net core 2中使用stimulsoft license.key?此链接用于asp.net mvc。但是我不知道如何在asp.net core 1.1中使用它。如何在asp.net core 2中使用stimulsoft license.key?