Skip to main content
All docs
V24.2

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

IErrorFilteringService Interface

In This Article

Allows you to filter messages shown in the Error List panel (Report Designer)

Namespace: DevExpress.XtraReports.Web.ReportDesigner.Services

Assembly: DevExpress.XtraReports.v24.2.Web.dll

NuGet Package: DevExpress.Web.Reporting.Common

#Declaration

public interface IErrorFilteringService

#Remarks

You can programmatically filter messages shown in the Error List panel:

Error List Panel

For this, do the following:

  1. Create a class that implements the IErrorFilteringService interface.
  2. Use the Filter(IEnumerable<ErrorDataContract>) method to modify the collection of errors.
  3. Register the custom class that implements the IErrorFilteringService interface at application startup.

The following code snippet is a service that hides all errors related to report layout:

class CustomErrorFilter : IErrorFilteringService {
    public IEnumerable<ErrorDataContract> Filter(IEnumerable<ErrorDataContract> errors) {
        return errors.Where(e => e.ErrorSource != DevExpress.XtraReports.Diagnostics.ErrorSource.ReportLayout);
    }
}

Register the CustomErrorFilter service at application startup:

using DevExpress.XtraReports.Web.ReportDesigner.Services;
// ...
builder.Services.AddScoped<IErrorFilteringService, CustomErrorFilter>();
See Also