Do I need to do anything special in .NET code to execute events declared in MRT files?
Here's the report server in ASP.NET MVC Core 3.1:
Code: Select all
public class ReportRequest
{
public string MRTfile { get; set; } = "";
public Dictionary<string, string> Json { get; set; } = new Dictionary<string, string>();
}
Code: Select all
[HttpPost]
public IActionResult GeneratePDF(ReportRequest request)
{
var path = StiNetCoreHelper.MapPath(this, "reports/" + request.MRTfile);
var str = System.IO.File.ReadAllText(path);
var report = StiReport.CreateNewReport();
report.LoadFromString(str);
foreach (KeyValuePair<string, string> json in request.Json)
{
var data = StiJsonToDataSetConverter.GetDataSet(json.Value);
report.RegData(json.Key, data);
}
return StiNetCoreReportResponse.ResponseAsPdf(report);
}
When I preview the MRT in Desktop Designer it executes the event but when I generate the PDF report in my .NET ASP.NET server it doesn't.
Do I need to do anything special in .NET code to execute events declared in MRT files?