Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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.v24.2.dll

NuGet Package: DevExpress.AspNetCore.Reporting

#Declaration

public static IServiceCollection ConfigureReportingServices(
    this IServiceCollection services,
    Action<ReportingConfigurationBuilder> configure
)

#Parameters

Name Type Description
services IServiceCollection

The service collection this methods extends.

configure Action<ReportingConfigurationBuilder>

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
IServiceCollection

A IServiceCollection that can be used to further configure application services.

#Remarks

This is an extension method for the application’s service collection (IServiceCollection). Call this method at the application startup. 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 at the application startup.

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

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddDevExpressControls();
builder.Services.AddMvc(); 

builder.Services.ConfigureReportingServices(configurator => {
    configurator.ConfigureReportDesigner(designerConfigurator => {
        designerConfigurator.RegisterDataSourceWizardConnectionStringsProvider<customProvider>();
    });
});  

var app = builder.Build();
See Also