Fix Report Design Issues with AI in the WPF Report Designer
- 4 minutes to read
This help topic describes how to configure the Report Design Analyzer to allow users to fix design issues with the help of an AI assistant. Suggested fixes leverage relevant report context, such as report elements and their property values.
The AI Assistant displays proposed changes for review. For some issues, the assistant can apply the fix after the user confirms it. For other issues, it suggests a solution that the user must implement manually.
Install NuGet Packages
DevExpress.AIIntegration.Wpf.Reporting- Microsoft.Extensions.AI.OpenAI (Version=”10.5.1”)
- Azure.AI.OpenAI (Version=”2.3.0-beta.2”)
This help topic uses Azure OpenAI. See the following help topic for information about NuGet packages required for other supported AI services: AI-powered Extensions.
Register Your AI Client
Note
DevExpress AI-powered extensions follow the “bring your own key” principle. DevExpress does not offer a REST API and does not ship any built-in LLMs/SLMs. You need an active Azure/Open AI subscription to obtain the REST API endpoint, key, and model deployment name. These variables must be specified at application startup to register AI clients and enable DevExpress AI-powered Extensions in your application.
using DevExpress.AIIntegration;
using DevExpress.Xpf.Core;
using Azure.AI.OpenAI;
using Microsoft.Extensions.AI;
using System.ClientModel;
using System.Windows;
namespace DXReportsAILocalization {
public partial class App : Application {
static App() {
var container = AIExtensionsContainerDesktop.Default;
IChatClient chatClient = new AzureOpenAIClient(AzureOpenAIEndpoint, AzureOpenAIKey)
.GetChatClient(ModelId).AsIChatClient();
container.RegisterChatClient(chatClient);
}
private static Uri AzureOpenAIEndpoint = new Uri("YOUR_AZURE_OPENAI_END_POINT");
private static ApiKeyCredential AzureOpenAIKey = new ApiKeyCredential("YOUR_OPENAI_API_KEY");
static string ModelId = "YOUR_MODEL_NAME"; // For example, "gpt-5.4".
}
}
Create and Configure an AI Assistant Behavior
Attach the ReportDesignTroubleshooterBehavior to the End-User WPF Report Designer in XAML or code-behind.
Markup:
xmlns:dxrud="http://schemas.devexpress.com/winfx/2008/xaml/reports/userdesigner"
xmlns:dxai="http://schemas.devexpress.com/winfx/2008/xaml/ai"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
...
<dxrud:ReportDesigner x:Name="designer">
<dxmvvm:Interaction.Behaviors>
<dxai:ReportDesignTroubleshooterBehavior/>
</dxmvvm:Interaction.Behaviors>
</dxrud:ReportDesigner>
Code-Behind:
using DevExpress.AIIntegration.Wpf.Reporting;
using DevExpress.Mvvm.UI.Interactivity;
// ...
public partial class MainWindow : Window {
public MainWindow() {
InitializeComponent();
ReportDesignTroubleshooterBehavior reportBehavior = new ReportDesignTroubleshooterBehavior();
Interaction.GetBehaviors(designer).Add(reportBehavior);
}
}
Analyze and Fix Issues
You can run the issue analysis in the following ways:
Use the Fix Issues with AI icon in the Report Design Analyzer to analyze an individual issue. This icon appears only for issues that can be analyzed with AI.

Use the smart tag on a report, band, or control to analyze issues related to that specific report element:

While the LLM analyzes the issue, a wait screen is displayed. You can click Cancel to stop the analysis.

When the analysis is complete, the Review Changes and Suggestions dialog appears:

The dialog contains two categories of results:
- Changes
- Proposed modifications that can be applied to the report automatically. Changes are grouped by category: Layout, Data Binding, Barcode, Summary, and Other. Each change lists the affected report element, the issue description, the proposed fix, relevant property values, and a label that indicates the change type: Modify, Add, or Remove. Use check boxes to select all or individual changes.
- Suggestions
- Recommendations that require manual review or manual changes to the report.
You can switch between two categories or display both using the filter drop-down:

Use Search to filter the results by text.
Click Apply to update the report with the selected changes. Cancel closes the dialog without applying the selected changes.
Issues Available for AI Analysis
AI-powered analysis is available for the following Report Design Analyzer issues:
- XRE002
- The control is outside the right page margin.
- XRE003
- The control is outside of the report’s printing area.
- XRE004
- The control is overlapped.
- XRE015
- The text format string is invalid.
- XRE022
- The property’s binding is invalid.
- XRE023
- The property’s expression is invalid.
- XRE024
- The data member is invalid.
- XRE026
- The filter string is invalid.
- XRE050
- The barcode text contains invalid characters.
- XRE051
- The barcode text format is not valid.
- XRE053
- The barcode bounds are too small.
- XRE070
- The line’s width exceeds its bounds.
- XRE080
- The cross tab field is invalid.
- XRE090
- No region is specified for the summary.
- XRE230
- Some elements of your document overlap and thus can be exported to Excel format incorrectly.