I am using Angular Report viewer and using the Github example. I wanted to pass the parameter (as show below) to the action GetReport() so that I can use the report accordingly. I wanted to use the dynamic based on the parameter.
Code: Select all
[HttpPost]
public IActionResult GetReport(int reportId)
{
var report = StiReport.CreateNewReport();
var appReport = _reportRepository.Get(reportId);
if (string.IsNullOrEmpty(appReport.ReportDefinition))
{
Logger.Error(L("ReportDoesNotAvailable", reportId));
return BadRequest();
}
report.LoadFromString(appReport.ReportDefinition);
return StiAngularViewer.GetReportResult(this, report);
}