Telerik Reporting Using ASP NET MVC

4 posts, 0 answers
  1. Aubrey Ivan
    Aubrey Ivan avatar
    25 posts
    Member since:
    Oct 2019

    Posted 28 Oct Link to this post

    I am following this guide -> https://docs.telerik.com/reporting/mvc-report-viewer-extension-embedding

    Hi, I am new in telerik reporting and I am getting some errors.

    Here is the Scenario:
    I created an empty ASP .NET MVC Application and I am trying to output the reportViewer I created. This is what I selected
    I chose the sample report definition.
    After that it generated 3 files. A ReportsController, a trdp file and a cshtml file

     1. I created a HomeController, and renamed the Action "Index" to "Reports".
     2. I Renamed the cshtml file to "Reports.cshtml" and putted it under the Views/Home Folder.
     3. Then I created a folder under the Controllers folder called "api" so it now looks like this Controllers/api and moved the ReportsController to that "api" folder
     4. I also changed the default route action from "index" -> "reports"


    Problem: Whenever I run my program, nothing shows at all. Its just an empty page. What am I doing wrong?

     

    Note: I also posted this question here -> https://stackoverflow.com/questions/58600533/telerik-reporting-using-asp-net-mvc

  2. Neli
    Admin
    Neli avatar
    190 posts

    Posted 31 Oct Link to this post

    Hello Aubrey,

    I noticed that you've opened a support ticket on the same topic. I will summarize our communication also here for the benefit of our community.

    In case you added the HTML5 MVC Report Viewer through the Item template, then the REST service should be automatically created. If there is nothing on the page, I suspect that there is something wrong with the routes or maybe you navigate to the wrong page. You can also check for any errors with the browser's console and use Fiddler to follow the exact requests from the viewer to the service.

    Our MVC demo can be found at C:\Program Files (x86)\Progress\Telerik Reporting <VERSION>\Examples\CSharp.

    Since you mention that you are a new user of Telerik Reporting, you can take a look at our First Steps articles:

    Creating the Demo report

    Setting the page header

    Populating the table with data

    Creating the graph

    Setting the page footer

    Integrating the report in Visual Studio Application

    Parameterizing the graph

    Adding the column graph

    Regards,
    Neli
    Progress 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. Aubrey Ivan
    Aubrey Ivan avatar
    25 posts
    Member since:
    Oct 2019

    Posted 31 Oct in reply to Neli Link to this post

    Hi Neli, 

    I figured it out, but I am still wondering how to assign a objectDataSource to a report on runtime, do I need to add a custom resolver?

    Thanks,
    Ivan
  4. Peter
    Admin
    Peter avatar
    1665 posts

    Posted 05 Nov Link to this post

    Hello Ivan,

    Yes, one of the approaches is with a Custom Report Resolver, but before that consider just to configuring the datasource with some parameters from the viewer.

    Regards,
    Peter
    Progress 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
Back to Top