Web API Edition | ComponentOne
Services / Report Services / Register Report Provider
In This Topic
    Register Report Provider
    In This Topic

    ComponentOne Studio Web API Edition provides support for SSRS reports for the WebApi services. To work with different report types in C1 WebApi, you need to specify the report provider information in the service request URL. Before you specify the provider information in the Service URL, you need to register the report provider in your Visual Studio application.

    To locate the real path of the report, you need to register a report provider which provides the root path of the report. The report provider should be registered by using the ReportProviderManager class in the Startup.Configuration section of your application.

    Steps to Register Report Provider

    For FlexReport

    1. From the Solution Explorer window in Visual Studio, select and open the Startup.cs file.
    2. In the Startup.cs file, under the Configuration section, you can use ReportProviderManager.AddFlexReportStorage() method and ReportProviderManager.AddFlexReportDiskStorage() method to add the storage information which contains report definitions (.flxr or .xml).
      Example
      Copy Code
      app.UseReportProviders()
      .AddFlexReportDiskStorage("Root", @"../reports");
      

    For SSRS Reports

    1. Form the Solution Explorer window in Visual Studio, select and open the Startup.cs file.
    2. In the Startup.cs file, under the Configuration section, you can use ReportProviderManager.AddSsrsReportHost() method to add the SSRS server URL configuration in your application.
      Example
      Copy Code
      app.UseReportProviders()
      .AddSsrsReportHost("local", "http://demo.ssrsreports.com/ReportServer");