How to Setup WebAPI - documentation out of date?

6 posts, 0 answers
  1. Jon
    Jon avatar
    17 posts
    Member since:
    Jul 2013

    Posted 05 Sep Link to this post

    Hi All,

    I've been attempting to setup WebAPI/MVC with a (very) basic Reporting example. I've been following the instructions here:

    http://docs.telerik.com/reporting/telerik-reporting-rest-host-http-service-using-web-hosting

    But the instructions appear to be out of date, does anyone know of any up-to-date documentation? (ie using .Net 4.5.2 and WebAPI 2)

    (I've tried my paid Telerik support tickets, but they only reply with stock written answers which don't answer the question.)

    Thanks in advance,

    Jon

     

  2. Stef
    Admin
    Stef avatar
    3041 posts

    Posted 07 Sep Link to this post

    Hello Jon,

    Below is quote from last post in your support ticket on the same question. The video is attached to this post for anyone interested.
    ".....
    1. Creating a report
      1. In Visual Studio - you will end with a class inheriting Telerik.Reporting.Report.
        You need a classic .NET ClassLibrary project, not ASP.NET Core ClassLibrary that produces a Nuget package - this is a new technology not supported officially by wizards and designers.
        The steps are to create a standard ClassLibrary targeting .NET 4+ Full profile and to add a new item via VS -> select the ClassLibrary ->Add -> New Item -> select Reporting from the menu ->Telerik Report <VERSION e.g. R2 2016> Wizard.
        Follow the wizard to generate a sample report.
      2. In the Standalone Report Designer - you will end with a Telerik.Reporting.Report object serialized in XML (TRDX file) or its compressed version (TRDP). To start select File->New->Band Report Wizard and follow the wizard to create a sample report.
    2. Displaying the report in an MVC project
      Officially supported are MVC4 and MVC5. New project templates of ASP.NET Core are not supported yet due to the major differences in technologies.
      Thus create an ASP.NET MVC5 Empty project in Visual Studio.Select the project Add->New Item-> select Web from the menu ->Telerik MVC Report VIewer View <VERSION e.g. R2 2016>. Follow the wizard, where at 'Configure report source' step you can select to add the default test report or to select the one you created.
      Additionally, there are standard MVC settings like:
      • Add a standard controller that will return the view e.g. HomeController;
      • Make its default Index action to return the newly added view with the viewer:
        public class HomeController : Controller
           {
               //
               // GET: /Homr/
               public ActionResult Index()
               {
                   return View("ReportViewerView1");
               }
           }
      • Move the newly added view in the folder generated for the added standard controller;
      • Verify that the default route for non-WebAPI controllers is set in a way that on start you will see the page with the viewer:
        public class RouteConfig
           {
               public static void RegisterRoutes(RouteCollection routes)
               {
                   routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
         
                   routes.MapRoute(
                       name: "Default",
                       url: "{controller}/{action}/{id}",
                       defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
                   );
               }
           }
      • Run Visual Studio Nuget Packages Manager to update all references added via Nuget packages. The version of Nuget packages is one of the main differences between MVC4 and MVC5. The VS Nuget Packages Manager will add the required binding redirects in the corresponding projects config file.

    The above settings are illustrated in the attached video. Please note that we are using the basic project templates in the video and in all tutorials. Due to the great variety of project types we illustrate only the required settings, where developers are free to use and adjust only the features they need, with consideration of the main, obligatory settings.

    ...."


    At the end of the post there is a list of questions regarding your setup and test, which are important for troubleshooting the occurring problems.
    Thank you for your cooperation.

    Regards,
    Stef
    Telerik by Progress
    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. Jon
    Jon avatar
    17 posts
    Member since:
    Jul 2013

    Posted 07 Sep in reply to Stef Link to this post

    Where is the up-to-date documentation?
  5. Stef
    Admin
    Stef avatar
    3041 posts

    Posted 08 Sep Link to this post

    Hello Jon,

    The attached video follows the steps from How To: Create a Report (Visual Studio) and How To: Use HTML5 ASP.NET MVC Report Viewer in an application. Any modifications related to project type, structure and hosting are not explicitly listed.


    If you are interested in MVC6, please go through HTML5 Report Viewer and ASP.NET 5 and the discussion in Reporting .NET Core.


    We will appreciate your feedback on the issues you met with the provided documentation (which steps are misleading and the context they are applied in), including the details requested in your support ticket on the same question:
    If you need further help, we will need your cooperation to identify the issues in the settings:
    1. Which report designer is used?
    2. What types of projects are used?
    3. What is the target .NET framework?
    4. How do you test the project - from IIS express or the application is hosted in local IIS?
    5. Have you changed any relative paths used for loading CSS, JS files, including the viewer's settings? Relative paths are important for getting the resources, incorrectly resolved paths would prevent the loading of resources.
    6. Do you have any other WebAPI controllers in your application and what routes are registered for them in the Global.asax?
    A demo project illustrating your settings will be required for better understanding of the issue.


    Regards,
    Stef
    Telerik by Progress
    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. Jon
    Jon avatar
    17 posts
    Member since:
    Jul 2013

    Posted 08 Sep in reply to Stef Link to this post

    How do I play the swf video? I've tried VLC and Windows Media Player, neither play it. Your referenced links are out of date and don't even cover creating a REST service in WebAPI/MVC. Which is why I repeatably ask for an up-to-date documentation link, I think perhaps you're stalling, there isn't any up-to-date documentation and you're hoping this all goes away.
  7. Stef
    Admin
    Stef avatar
    3041 posts

    Posted 09 Sep Link to this post

    Hello Jon,

    The attached file is SWF and it can be loaded in IE browser. the video illustrates the process described in http://docs.telerik.com/reporting/mvc-report-viewer-extension-embedding (How To: Use HTML5 ASP.NET MVC Report Viewer in an application).

    The start project is the empty MVC5 project template of Visual Studio. The HTML5 viewer and Reporting REST service are added automatically by selected Telerik Reporting VS item template.


    If the question is how to set the Reporting REST service manually in a Web Application, please check the video attached to this post. It is a SWF file that can be previewed in IE browser.
    We follow the instructions from http://docs.telerik.com/reporting/telerik-reporting-rest-host-http-service-using-web-hosting, where the start project will be an empty MVC5 project.

    The error I detected in the documentation is an assembly that should be removed from the list - article: http://docs.telerik.com/reporting/telerik-reporting-rest-implementing-http-service , step 2: Telerik.Reporting.Cache.Database. This setting is not valid for the Reporting REST service.
    I guess this is the issue you reported in your support ticket. The documentation will be updated in a consecutive release.


    In case the provided information is not sufficient, please elaborate on the scenario and provide us with exact steps how to reproduce the problem locally.

    Regards,
    Stef
    Telerik by Progress
    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
DevCraft banner