Reporting in MVC 6

15 posts, 0 answers
  1. Tim
    Tim avatar
    1 posts
    Member since:
    Dec 2015

    Posted 05 Jan Link to this post

    I am attempting to test Reporting in MVC 6, however, I am unable to find the Nuget package referenced in the documentation. Can someone please attach this package, or provide a link to where they can be found?
  2. Stef
    Admin
    Stef avatar
    3036 posts

    Posted 06 Jan Link to this post

    Hi Tim,

    Telerik Reporting MVC 6  packages were last updated in Q3 2015 v9.2.15.930 by using MVC6 beta6. Since then there are new beta versions of MVC6, thus we decided to to pause the further development of the Nuget packages until the official release of MVC6. The packages are not tested against the latest MVC6 updates.

    If you want to test the packages included in v9.2.15.930, you can download them after logging into your account and navigating to Products & Subscriptions - DevCraft - Download - Reporting - Older versions - v9.2.15.930.

    Note that the purpose of the available packages is only educational, and our recommendation is to use the old web projects templates provided by Visual Studio with the HTML5 Viewer.


    Regards,
    Stef
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft banner
  4. Scott
    Scott avatar
    20 posts
    Member since:
    Aug 2011

    Posted 10 Mar Link to this post

    Hello,

    Has there been any additional work done on reporting for MVC6? It's holding up moving forward with a project that needs to be moved from MVC5. If nothing has been done are there any workarounds at this point? Is it possible to use the HTML5 control? If so, I assume this means there would be additional manual configuration.

    Thanks for any suggestions,

    Scott

  5. Stef
    Admin
    Stef avatar
    3036 posts

    Posted 11 Mar Link to this post

    Hello Scott,

    There is MVC6 RC1 and we built the reporting Nuget packages with this version. The steps are as in HTML5 Report Viewer and ASP.NET 5 , where the difference since MVC6 beta6 is that the wwwroot/web.config is totally ignored and connection strings must be hardcoded in reports or you will need a custom resolver for the Reporting REST service to update the data items DataSource properties at run-time.
    Packages are still for educational purpose, until there is an official release we do not recommend using them in application for production needs.

    Other approach is to use the HTML5 Viewer and host the Reporting REST service in a standard web application with enabled CORS.


    I hope this information is helpful.

    Regards,
    Stef
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  6. Scott
    Scott avatar
    20 posts
    Member since:
    Aug 2011

    Posted 12 Mar in reply to Stef Link to this post

    Stef,

    Thank you so much for the updated information...looking forward to giving it a go.

    Regards,

    Scott

  7. Scott
    Scott avatar
    20 posts
    Member since:
    Aug 2011

    Posted 17 Mar in reply to Stef Link to this post

    Stef,

    I've followed the steps detailed but cannot get the report to display. I don't have any errors the page just displays, "Loading..." and nothing ever appears. It appears everything is loading and firing but I am at a loss as to where things are breaking down. Attached is a screenshot of what I'm seeing and the network load of resources and web api calls. Any thoughts on what may be going wrong is appreciated. The only thing that was a little weird when putting the project together is when I use the line:

    <script src="@Url.Content("~/ReportViewer/js/telerikReportViewer-10.0.16.204.min.js")"></script>

    I get an error saying it was expecting ";" and it fails. To correct it I just moved that .js file to a webserver and referenced it without the Url.Content piece. Could that be messing me up? I saw there was a note about having to use Url.Content but I couldn't get it to work with that javavscript file however it does appear to be fine when used for the ServiceUrl and the TemplateUrl.

    Thanks for any guidance,

    Scott

  8. Scott
    Scott avatar
    20 posts
    Member since:
    Aug 2011

    Posted 17 Mar in reply to Scott Link to this post

    Actually I just see now where it is failing during a look for a pdf plugin as shown in the attachment. Does that matter?

     

  9. Scott
    Scott avatar
    20 posts
    Member since:
    Aug 2011

    Posted 17 Mar in reply to Scott Link to this post

    Sorry for the many posts but I just installed Acrobat and it isn't failing at that point any longer but the report still does not display, only the "loading..." text.
  10. Stef
    Admin
    Stef avatar
    3036 posts

    Posted 18 Mar Link to this post

    Hi Scott,

    Please check the response from the server, and if it contains the report rendered in HTML. If yes, check if the DIV element hosting the viewer's object is sized correctly via CSS rules.

    The recommended troubleshooting approach is to use Fiddler or other proxy tool to check the requests, their responses and statuses. Information about requests and responses content can be seen in Fiddler - Inspectors - Request/Response - Raw tabs. This will let you check requests to the Reporting REST service and if the URLs are correct (if relative paths are resolved correctly).
    Note that relative paths may need adjustment depending on how the application is hosted.



    Feel free to open a support ticket and send us the log file generated by Fiddler.

    Regards,
    Stef
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  11. Scott
    Scott avatar
    20 posts
    Member since:
    Aug 2011

    Posted 18 Mar in reply to Stef Link to this post

    Thanks Stef.

    I used Fiddler and examined the traffic of a working HTML sample and it looks like everything is going fine all the way up until the last API statement. I get two /info GETs and then the /pages/1 API call that should take place never does. Any ideas on what might cause that? Working on a proof of concept and would love to get this going.

    Thank you so much,

    Scott

  12. Scott
    Scott avatar
    20 posts
    Member since:
    Aug 2011

    Posted 18 Mar in reply to Scott Link to this post

    Also, if I execute the GET .../pages/1 command in Fiddler it is properly returning the data including the HTML you would expect.
  13. Scott
    Scott avatar
    20 posts
    Member since:
    Aug 2011

    Posted 22 Mar Link to this post

    Solved...mostly.

    For others, my problem had to do with this line.

    <script src="@Url.Content("~/ReportViewer/js/telerikReportViewer-10.0.16.204.min.js")"></script>

    It was not working properly as in my startup file I was not running this line:

    app.UseStaticFiles();

    After that things worked just fine...almost. I am left with a toolbar that I not displaying correctly; it looks like a mobile version and is stacked using only text and no icons. I've attached a picture. Also, Fiddler shows this error:

    Name Protocol Method Result Content type Received Time Initiator
    http://localhost:7430/api/reports/resources/styles/telerikReportViewer-css HTTP GET 404  0 B 53.82 ms link

    How do I correct it and will this fix my formatting? I think it probably will.

    Thank you,

    Scott

  14. Scott
    Scott avatar
    20 posts
    Member since:
    Aug 2011

    Posted 22 Mar in reply to Scott Link to this post

    I was not including the "telerikReportViewer.css" stylesheet.

    All is good now.

     

    Thank you

  15. Stef
    Admin
    Stef avatar
    3036 posts

    Posted 23 Mar Link to this post

    Hello Scott,

    Thank you for the updates.

    About the last problem, the viewer's HTML template is requested as .html file from the Reporting REST service. The HTML template contains two links to the viewer's CSS template file and icons font. If you have issues performing the requests in this manner, each file can be linked from the page directly, and the viewer will not request the files from the Reporting REST service.

    Regards,
    Stef
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  16. Scott
    Scott avatar
    20 posts
    Member since:
    Aug 2011

    Posted 23 Mar in reply to Stef Link to this post

    Stef,

    I appreciate all the help; thank you - everything is working perfectly now.

    Great Products!

    Regards,

    Scott

Back to Top
DevCraft banner