Generate Reports From Prompts (Web Report Designer)
- 6 minutes to read
Follow the instructions in this help topic to integrate AI-powered Prompt-to-Report functionality into the Web Report Designer. Once integrated, users can create reports by specifying a prompt (report description in natural language). This tutorial uses Azure OpenAI.

Note
This functionality is not supported in the Web Report Designer control for ASP.NET MVC and ASP.NET Web Forms.
Install NuGet Packages
Install the following NuGet packages to use Azure OpenAI:
- DevExpress.AIIntegration.AspNetCore.Reporting
- Microsoft.Extensions.AI (Version=”10.5.1”)
- Microsoft.Extensions.AI.OpenAI (Version=”10.5.1”)
- Azure.AI.OpenAI (Version=”2.3.0-beta.2”)
For the list of supported AI services and their corresponding prerequisites, refer to the Supported AI Services section of the following help topic: AI-powered Extensions for DevExpress Reporting.
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.
Register AI Service and Activate Extension
Call the following methods at application startup:
- AddDevExpressAI
- Adds DevExpress AI-related services to the application service collection.
- AddWebReportingAIIntegration
- Adds AI-powered functionality to the Web Document Viewer and Web Report Designer.
- AddPromptToReportConverter()
Activates AI-powered Prompt-to-Report functionality in the Web Report Designer.
Use the following methods to specify Prompt-to-Report settings:
-
Specifies whether to automatically resolve report control overlapping.
-
Specifies the number of attempts to fix report layout errors that appear in the LLM response.
-
Allows you to modify the predefined prompt collection available in the Report Wizard.
-
Specifies output randomness. Lower temperatures yield more predictable and focused outputs, while higher temperatures produce more diverse and creative responses.
-
Specifies additional instructions that modify the prompt before processing. The following snippet registers an Azure OpenAI service, activates the AI-powered Prompt-to-Report option in the Report Wizard, adds a custom prompt, and enables the option that automatically resolves control overlapping:
-
using Azure.AI.OpenAI;
using Microsoft.Extensions.AI;
using System;
// ...
builder.Services.AddDevExpressControls();
// ...
string azureOpenAIEndpoint = Environment.GetEnvironmentVariable("AZURE_OPENAI_ENDPOINT");
string azureOpenAIKey = Environment.GetEnvironmentVariable("AZURE_OPENAI_API_KEY");
string deploymentName = "MODEL_NAME"
IChatClient chatClient = new AzureOpenAIClient(new Uri(azureOpenAIEndpoint),
new System.ClientModel.ApiKeyCredential(azureOpenAIKey))
.GetChatClient(deploymentName).AsIChatClient();
builder.Services.AddSingleton(chatClient);
builder.Services.AddDevExpressAI(config => {
config.AddWebReportingAIIntegration(aiConfig => {
aiConfig.AddPromptToReportConverter(options => {
options.ConfigurePredefinedPrompts(prompts => {
prompts.Add(new AIReportPrompt {
Title = "Custom Prompt 1",
Text = "Custom Prompt Text"
});
})
.FixLayoutErrors()
.SetRetryAttemptCount(5);
});
});
});
Disable AI-powered Functionality for a Specific Control
AI-powered functionality configured within AIReportingConfigurationBuilder is available for all Report Viewer and Report Designer components in the application. If you need to disable this AI-powered functionality for a specific Web Report Designer control, set the client AIServicesEnabled property to false in the BeforeRender event handler. The following snippet disables AI-powered functionality for a Report Designer in an ASP.NET Core application:
<script type="text/javascript">
function onBeforeRender(e, s) {
DevExpress.Reporting.Designer.Settings.AIServicesEnabled(false);
}
</script>
@{
var designerRender = Html.DevExpress().ReportDesigner("reportDesigner")
.Height("100%")
.ClientSideEvents(configure => configure.BeforeRender("onBeforeRender"))
.Bind(Model);
@designerRender.RenderHtml()
}
Generate Reports from Prompts
Once the functionality is registered, the Report Wizard interface displays the new AI Prompt-to-Report option.
Select this option to create an AI-generated report.

AI-powered report generation works with two data source options:

- No Data Source
Creates a complete report structure based only on the user’s natural language description.
Tip
You can also use our AI-generated Test Data Source functionality to preview created reports with meaningful data. For more information, refer to the following help topic: Preview Reports with AI-generated Test Data.
- Add Data Source
- Allows users to create a report data source in the first step, displays the data source structure in the Report Wizard interface, and automatically includes this metadata in the LLM prompt. Users can reference available data source fields when they describe data-bound report elements.
Enter Report Prompt
Choose a predefined prompt or enter your own prompt. Click Finish.

Tip
You can adjust predefined prompts or create a new prompt from scratch. Review the Configure Predefined Prompts section for more information.
On the next page, the Wizard analyzes the specified prompt and builds the report:

If input is incomplete or ambiguous, the system may request additional information about the report structure, such as:
- “What should the report title be?”
- “Would you like to introduce customer address details in the report: yes/no?”
“Please specify page size and orientation for this report. For example, A4, portrait, letter landscape, or custom dimensions.”

The following image illustrates the generated data-bound report and its preview:


Configure Report Prompt
General Tips
Report generation uses a structured agentic workflow composed of specialized agents. Each agent handles a distinct stage of the pipeline, from intent clarification and input validation to layout planning and output verification.
Output accuracy depends on the level of detail in the natural-language description. The more detail the user provides about layout preferences, calculations, grouping requirements, and visualization types, the fewer assumptions the model needs to make.
Users can also describe the report intent in plain language without specifying the exact report structure. In this case, the model may request additional information and adapt the report based on the user’s input to generate a valid layout.
Call the FixLayoutErrors method to automatically fix report control overlapping. Use the SetRetryAttemptCount method to increase the number of attempts to fix report layout errors that appear in the LLM response. The SetTemperature method allows you to control output randomness.
Configure Predefined Prompts
Built-in prompt suggestions show ready-to-use examples. You can use the built-in predefined prompts or create your own prompts.

Note that prompt changes made in the Report Wizard do not persist.
To make permanent changes to built-in prompts, use the ConfigurePredefinedPrompts method to access the predefined prompt collection. You can modify prompt “Text” and “Title”, or remove built-in prompts. You can also add custom prompts to the collection.
Add a New Prompt
Call the ConfigurePredefinedPrompts method to access the predefined prompt collection (collection of AIReportPrompt objects) and add a new prompt.
The following code snippet adds a “Custom Prompt” to the predefined prompt collection:
using DevExpress.AIIntegration.Reporting;
// ...
builder.Services.AddDevExpressAI(config => {
config.AddWebReportingAIIntegration(aiConfig => {
aiConfig.AddPromptToReportConverter(options => {
options.ConfigurePredefinedPrompts(prompts => prompts.Add(new AIReportPrompt {
Title = "Custom Prompt",
Text = "Custom Prompt Text"
}));
});
});
});
After you add a custom prompt to the collection, the prompt appears in the Report Wizard:
