Code: Select all
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();
Controller :
Code: Select all
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);
}
Code: Select all
@using Stimulsoft.Report.NetCore
@Html.Stimulsoft().StiNetCoreViewer("NetCoreViewver1",new StiNetCoreViewerOptions()
{
Actions =
{
GetReport = "GetReport",
ViewerEvent = "ViewerEvent"
}
})