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

MVC Report Viewer

1 Answer 165 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 30 Jul 2019, 04:41 PM

I am trying to get the MVC Report Viewer working with my project.

I am seeing the following errors in the browser:

http://localhost:3032/api/reports/resources/js/telerikReportViewer net::ERR_ABORTED 404 (Not Found)

Uncaught TypeError: jQuery(...).telerik_ReportViewer is not a function
    at HTMLDocument.<anonymous> (SalesReportViewer:37)
    at l (jquery-3.3.1.min.js:2)
    at c (jquery-3.3.1.min.js:2)

I can confirm that this URL works:  http://localhost:3032/api/reports

[{"name":"PDF","localizedName":"Acrobat (PDF) file"},{"name":"CSV","localizedName":"CSV (comma delimited)"},{"name":"XLS","localizedName":"Excel 97-2003"},{"name":"RTF","localizedName":"Rich Text Format"},{"name":"IMAGE","localizedName":"TIFF file"},{"name":"MHTML","localizedName":"Web Archive"},{"name":"XPS","localizedName":"XPS Document"}]

But this does not: http://localhost:3032/api/reports/formats

The ReportViewer folder in my project is empty should it be populated?

The Example Telerik Reporting project works and the MVC ReportViewer shows as expected.    However, I can't figure out what might be missing from my project.   I reviewed a number of your instruction pages but have not found the proper solution.

Any guidance you can provide would be great.   Thanks

Peter

1 Answer, 1 is accepted

Sort by
0
Peter
Top achievements
Rank 1
answered on 30 Jul 2019, 05:16 PM

I already had a "ReportsController" within my project.   When present, you don't add that file or another name of it.   With a little coaxing, (renaming, etc), the ReportsController was created and then I renamed it.    I forgot to change the cshtml page to reference the new "api/{controller}" name.

Peter

 

 

Tags
General Discussions
Asked by
Peter
Top achievements
Rank 1
Answers by
Peter
Top achievements
Rank 1
Share this question
or