Back to Devexpress

ReportingConfigurationBuilderBase<T>.UseDevelopmentMode() Method

xtrareports-devexpress-dot-xtrareports-dot-web-dot-extensions-dot-services-dot-reportingconfigurationbuilderbase-1.md

latest3.9 KB
Original Source

ReportingConfigurationBuilderBase<T>.UseDevelopmentMode() Method

Enables Development Mode for extended diagnostics.

Namespace : DevExpress.XtraReports.Web.Extensions.Services

Assembly : DevExpress.Web.Reporting.v25.2.Common.Services.dll

NuGet Package : DevExpress.Web.Reporting.Common.Services

Declaration

csharp
public T UseDevelopmentMode()
vb
Public Function UseDevelopmentMode As T

Returns

TypeDescription
T

An object that allows further configuration to be chained.

|

Remarks

Call the UseDevelopmentMode method at application startup to enable Development Mode:

csharp
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
// ...
public class Startup {
    public Startup(IConfiguration configuration, IWebHostEnvironment hostingEnvironment) {
        Configuration = configuration;
        HostingEnvironment = hostingEnvironment;
    }

    public IConfiguration Configuration { get; }
    public IWebHostEnvironment HostingEnvironment { get; }
    // ...
    public void ConfigureServices(IServiceCollection services) {
        services.ConfigureReportingServices(configurator => {
            if (HostingEnvironment.IsDevelopment()) {
                configurator.UseDevelopmentMode();
            }
            // ...
        });
    }
    // ...
}

Development Mode allows you to perform the following diagnostics:

Library Version Validation

The DevExpress Web Reporting application relies on a server-side application to process reports. The version of the DevExpress scripts ( npm packages ) should match the version of server-side libraries ( NuGet packages ). You can enable the CheckClientLibraryVersions option to check for library version mismatch on every request to the server.

If versions do not match, a warning is written to the log:

Client Error Detection

When you call the DevelopmentMode() method, the client-side Development mode is also enabled. It allows you to catch the following errors that occur on the client in the early rendering stages:

  • errors that occur before the call to the applyBinding method in the BeforeRender, CustomizeActions, CustomizeElements events;
  • errors that occur during the ko.applyBindings method call.

When an error occurs, the following message is displayed with a link to the Reporting Application Diagnostics help topic:

You can use the EnableClientSideDevelopmentMode property to enable or disable the client-side Development mode.

See Also

ReportingConfigurationBuilderBase<T> Class

ReportingConfigurationBuilderBase<T> Members

DevExpress.XtraReports.Web.Extensions.Services Namespace