StartupExtensions.RemoveDefaultReportingControllers(IMvcBuilder) Method
Removes the default reporting controllers from an application.
Namespace: DevExpress.AspNetCore.Reporting
Assembly: DevExpress.AspNetCore.Reporting.v19.1.dll
NuGet Package: DevExpress.AspNetCore.Reporting
Declaration
Parameters
Name | Type | Description |
---|---|---|
builder | IMvcBuilder | The IMvcBuilder instance this method extends. |
Returns
Type | Description |
---|---|
IMvcBuilder | A IMvcBuilder that can be used to further configure the MVC services. |
Remarks
When you add the DevExpress.AspNetCore.Reporting assembly to your application, the default MVC reporting controllers are registered automatically.
If you want to use your custom controllers to process requests, call the RemoveDefaultReportingControllers method to unregister the default controllers.
using DevExpress.AspNetCore;
using DevExpress.AspNetCore.Reporting;
//...
public class Startup {
//...
public void ConfigureServices(IServiceCollection services) {
services.AddDevExpressControls();
services.AddMvc().RemoveDefaultReportingControllers();
}
//...
}
To implement custom MVC reporting controllers:
- Inherit from the ReportDesignerController, WebDocumentViewerController and/or QueryBuilderController classes.
- Specify a URI to each controller using the ReportDesignerHandlerUri(String), ReportPreviewHandlerUri(String) and QueryBuilderHandlerUri(String) methods of the ReportDesignerBuilder object and the HandlerUri(String) method of the WebDocumentViewerBuilder object.
See Also