MVC Report Viewer

2 posts, 0 answers
  1. Peter
    Peter avatar
    16 posts
    Member since:
    Jul 2019

    Posted 30 Jul Link to this post

    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

  2. Peter
    Peter avatar
    16 posts
    Member since:
    Jul 2019

    Posted 30 Jul Link to this post

    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

     

     

Back to Top