StartupExtensions.ConfigureReportingServices(IServiceCollection, Action<ReportingConfigurationBuilder>) Method

Allows you to register custom or predefined services to provide specific functionality to the Web Report Designer, Web Document Viewer and Web Query Builder.

Namespace: DevExpress.AspNetCore.Reporting

Assembly: DevExpress.AspNetCore.Reporting.v18.2.dll

Declaration

public static IServiceCollection ConfigureReportingServices(
    this IServiceCollection services,
    Action<ReportingConfigurationBuilder> configure
)
<ExtensionAttribute>
Public Shared Function ConfigureReportingServices(
    services As IServiceCollection,
    configure As Action(Of ReportingConfigurationBuilder)
) As IServiceCollection

Parameters

Type Name Description
Microsoft.Extensions.DependencyInjection.IServiceCollection services

The service collection this methods extends.

Action<ReportingConfigurationBuilder> configure

An Action<T> delegate method that allows you to configure Web Report Designer, Web Document Viewer and Web Query Builder custom services using the corresponding methods of the ReportingConfigurationBuilder object, which is passed as the delegate parameter.

Returns

Type Description
Microsoft.Extensions.DependencyInjection.IServiceCollection

A <xref:Microsoft.Extensions.DependencyInjection.IServiceCollection> that can be used to further configure application services.

This is an extension method for the application's service collection (IServiceCollection). Call this method within the Startup's ConfigureServices method. This makes the reporting services you register in the service collection available within the application and in the Configure method.

The code below registers a custom IDataSourceWizardConnectionStringsProvider service for the Web Report Designer.

using DevExpress.AspNetCore;
using DevExpress.AspNetCore.Reporting;
//... 

public class Startup {
//... 
    public void ConfigureServices(IServiceCollection services) {
        services.AddDevExpressControls();
        services.AddMvc(); 

        services.ConfigureReportingServices(configurator => {
            configurator.ConfigureReportDesigner(designerConfigurator => {
                designerConfigurator.RegisterDataSourceWizardConnectionStringsProvider<customProvider>();
            });
        });        
    }
//...    
}

See Also