This is a migrated thread and some comments may be shown as answers.

Telerik reporting - unable to get report parameters

1 Answer 311 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Zoran
Top achievements
Rank 1
Veteran
Zoran asked on 13 Dec 2020, 11:32 PM
I have a .net core app in which I have a Telerik report which has two parameters and I have the code like so

$("#summaryReport").click(function () {
                var viewer = $("#reportViewer1").data("telerik_ReportViewer");
                viewer.reportSource({
                    report: "Sumaren.trdp",
                    parameters: {}
                });
                viewer.refreshReport();
            });
 
 
            $("#reportViewer1")
                .telerik_ReportViewer({
 
                    serviceUrl: "api/reports/",
 
                    //ReportSource - report description
                    reportSource: {
                        // The report can be set to a report file name (trdx report definition)
                        // or CLR type name (report class definition).
                    },
 
                    viewMode: telerikReportViewer.ViewModes.INTERACTIVE,
 
                    scaleMode: telerikReportViewer.ScaleModes.SPECIFIC,
 
                    scale: 1.0,
                    enableAccessibility: true,
 
                    ready: function () {
                        this.refreshReport();
                    },
                });
I keep getting the error Unable to get report parameters. Report 'Sumared.trdp' cannot be resolved. Do I have to do something with the parameters in the reportSource? I think that when you add parameters via the Telerik Report Designer, do don't add anything in the reportSource besides the report name. The Telerik Designer previews the report just fine, works like it's supposed to but when I run the app it just keeps saying this - 'Unable to get report parameters. Report Sumaren.trdp cannot be resolved'

1 Answer, 1 is accepted

Sort by
0
Eric R | Senior Technical Support Engineer
Telerik team
answered on 16 Dec 2020, 10:34 PM

Hi Zoran,

This is usually an error when the report definition cannot be resolved. However, I am not able to see the source of the error from the provided information. It also looks like a similar issue is being handled in another ticket.

As a result, I will attach a sample that can be used for comparison. The sample illustrates the minimum requirements for setting up an ASP.NET Core 3.1 WebApi, the Reporting REST Service and the HTML5 Report Viewer. Let me provide a list of files to compare below. 

  • Startup.cs
  • Index.html
  • ReportsController

To run the sample locally, ensure the Telerik NuGet Feed is Configured in Visual Studio.

Please review the attached sample and let me know if you have any issues. Thank you for developing with Telerik Reporting.

Regards,


Eric R | Senior Technical Support Engineer
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
General Discussions
Asked by
Zoran
Top achievements
Rank 1
Veteran
Answers by
Eric R | Senior Technical Support Engineer
Telerik team
Share this question
or