Call service to bind the report

2 posts, 0 answers
  1. faris
    faris avatar
    10 posts
    Member since:
    Jun 2012

    Posted 24 Dec 2014 Link to this post

    Hye.

    i use MVC (Html5) to call the report. how to call the service for binding the report?
    mean example
    html5 call webapi
    http://xxxxxx/api/reports/getCompany

    in Webapi >
    public class GetCompanyController {
    public (what type need to return?) GetCompanyController(what parameter need request?)
       companyService.getCompany();
    }

    is it possible?

  2. Stef
    Admin
    Stef avatar
    3053 posts

    Posted 25 Dec 2014 Link to this post

    Hi Faris,

    In general, the HTML5 Report Viewer is a client-side widget served only by a running Reporting REST service, which is dedicated to display already created reports. It is the service that manages the report state and resources.

    Details how to add the viewer via template are available in the HTML5 Report Viewer Quickstart article


    How the viewer(client)-service pair works:

    Basically, the client (viewer) sends string description of the requested report (the viewer's reportSource.report value) to the service, and depending on the report resolvers in the service's CreateReportResolver method this string description will be resolved to a report source object.
    By default we provide ReportFileResolver and ReportTypeResolver. You can also create your own report resolvers as in the example in the How To: Implement a Custom Report Resolver article.

    Depending on how the application will be hosted, you can use the corresponding cache storage for the service - REST Service storage. If the service will be hosted separately, and will use a different domain you may need to enable CORS to allow the communication between the clients(viewers) and the service.


    For a working demo, check the local examples installed by default under C:\Program Files (x86)\Telerik\Reporting <VERSION>\Examples\CSharp.


    The recommended troubleshooting approach when using the viewer is to use the browser's Console or download and install Fiddler. In Fiddler - Inspectors - Request/Response - Raw tabs will be listed information about the made request and its response, including a list of all performed requests for the page.


    I hope the provided information is helpful.

    Regards,
    Stef
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. DevCraft banner
Back to Top