Page 1 of 1

How to pass parameters to Get Dynamic Report

Posted: Thu Nov 26, 2020 6:35 pm
by harshdeep71
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.

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);
        }
Thanks

Re: How to pass parameters to Get Dynamic Report

Posted: Mon Nov 30, 2020 2:15 pm
by Lech Kulikowski
Hello,

Sorry, maybe we did not exactly understand your question. Could you explain your issue in more detail, which parameters do you need?

Thank you.