How to pass parameters to Get Dynamic Report
Posted: Thu Nov 26, 2020 6:35 pm
Dear Support,
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.
Thanks
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);
}