Skip to main content

UserDesignerOptions.ReportLoadingRestrictionLevel Property

Specifies whether end-users are allowed to load untrusted reports with potentially dangerous content in a desktop reporting application.

Namespace: DevExpress.XtraReports.Configuration

Assembly: DevExpress.XtraReports.v23.1.dll

NuGet Package: DevExpress.Reporting.Core


public RestrictionLevel ReportLoadingRestrictionLevel { get; set; }

Property Value

Type Description

A RestrictionLevel enumeration value.

Property Paths

You can access this nested property as listed below:

Object Type Path to ReportLoadingRestrictionLevel
.UserDesignerOptions .ReportLoadingRestrictionLevel
.UserDesignerOptions .ReportLoadingRestrictionLevel


End-User Report Designer (WinForms and WPF) displays the following warning when a user attempts to load a potentially unsafe report:


A report is considered unsafe if it or any of its subreports contain any of the following:

The following code prevents users from loading unsafe reports:

static class Program {
    static void Main() {
        DevExpress.XtraReports.Configuration.Settings.Default.UserDesignerOptions.ReportLoadingRestrictionLevel =

The code above displays the error message when the user attempts to load a potentially unsafe report.


In a restricted environment where all reports are guaranteed to be safe, you can disable this warning and allow users to load any report by setting the UserDesignerOptions.ReportLoadingRestrictionLevel property to RestrictionLevel.Enable.

The following code lets you determine whether a report is considered unsafe, and displays detected security warnings in the Output window:

var traceSource = DevExpress.XtraPrinting.Tracer.GetSource("DXperience.Reporting", 
    System.Diagnostics.SourceLevels.Error | System.Diagnostics.SourceLevels.Warning);
var listener = new System.Diagnostics.DefaultTraceListener();
try {
    new XtraReport1().ShowRibbonDesignerDialog();
} finally {
See Also