RestService vs RestLibrary

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

    Posted 05 Sep Link to this post

    I'm following the instructions here:

    http://docs.telerik.com/reporting/quick-start-add-report-visual-studio

    It says that you need to create a Report Library to use reports in a REST API. But VS 2016 it gives two options, ReportLibrary1 and RestService1. What is the difference between them and which should I choose?

    Am I looking at outdated documentation, seems pretty basic stuff to include?

  2. Stef
    Admin
    Stef avatar
    3050 posts

    Posted 07 Sep Link to this post

    Hello Jon,

    Please refer to my post here and in your support ticket on the same question.

    Let us continue the discussion in one of the threads in order to keep a better track on the exchanged information and the progress 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
  3. DevCraft banner
  4. Jon
    Jon avatar
    17 posts
    Member since:
    Jul 2013

    Posted 07 Sep in reply to Stef Link to this post

    This is incorrect. I have given up on support tickets since the question is never answered. I therefore posted here. I did not ask this question in a support ticket, nor does your linked post answer the question.

    Please answer the question, here would preferable, since that is where the question is asked.

  5. Stef
    Admin
    Stef avatar
    3050 posts

    Posted 08 Sep Link to this post

    Hi Jon,

    Below is a quote from my last response in your support ticket:
    "Let us summarize the provided information, where we need you to verify that you are following each of the steps, including type of projects:
    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:
        Copy Code
        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:
        Copy Code
        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.

    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."


    The video is attached to this post as well.


    Please note that we do not guarantee replies by Telerik representatives in public forums in a timely manner. If it is an emergency, please use the support ticketing system to submit your inquiries.

    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

    Here is my question 'It says that you need to create a Report Library to use reports in a REST API. But VS 2016 it gives two options, ReportLibrary1 and RestService1. What is the difference between them and which should I choose?'

    Here is your response 'nothing to do with the question'.

    Can you please answer the question as stated. Oh and the 'video' doesn't play.

    Where is all this in the documentation?

  7. Stef
    Admin
    Stef avatar
    3050 posts

    Posted 09 Sep Link to this post

    Hi Jon,

    To create reports you need a  Telerik Report Library <VERSION> project template. The result is a ClassLibrary with a Telerik Report in it - http://docs.telerik.com/reporting/quick-start-add-report-visual-studio#create-a-report-library-with-a-report-definition. You can also create a ClassLibrary and then Add>New Item> Telerik Report <VERSION>.

    To create a web application with a Reporting REST Service only, without a page with the HTML5 Viewer, you can use the new Telerik Reporting REST service <VERSION> project template. The result will be a web application, with added Reporting REST WebAPI service (ReportsControllerBase implementation) in it.

    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