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

DxBlazorReportingAIOptions Class

Specifies options for AI-powered functionality in the Blazor Report Viewer.

Namespace: DevExpress.Blazor.Reporting

Assembly: DevExpress.AIIntegration.Blazor.Reporting.Viewer.v24.2.dll

NuGet Package: DevExpress.AIIntegration.Blazor.Reporting.Viewer

#Declaration

public class DxBlazorReportingAIOptions

#Remarks

Call the AddBlazorReportingAIIntegration method to register AI services for the Blazor Report Viewer. Use DevExpress.Blazor.Reporting.DxBlazorReportingAIOptions* to specify the following options for Summarize and Translate operations:

SummarizationMode
Specifies the summarization mode.
Languages
Specifies the language collection for Translate and Summarize operations.

The following code snippet registers an Azure OpenAI service and enables the DevExpress AI-powered extension for the Report Viewer:

using Azure;
using Microsoft.Extensions.AI;
using DevExpress.Blazor.Reporting;

// ....
string azureOpenAIEndpoint = Environment.GetEnvironmentVariable("AZURE_OPENAI_ENDPOINT");
string azureOpenAIKey = Environment.GetEnvironmentVariable("AZURE_OPENAI_API_KEY");
string deploymentName = "gpt4o";
//...
IChatClient asChatClient = new Azure.AI.OpenAI.AzureOpenAIClient(new Uri(AzureOpenAIEndpoint),
     new System.ClientModel.ApiKeyCredential(AzureOpenAIKey))
.AsChatClient("GPT4o");
builder.Services.AddSingleton(asChatClient);
builder.Services.AddDevExpressAI(config => {
    config.AddBlazorReportingAIIntegration(options => {
        options.Languages = new List<LanguageItem>() {
            new LanguageItem() { Key = "de", Text = "German" },
            new LanguageItem() { Key = "es", Text = "Spanish" },
            new LanguageItem() { Key = "en", Text = "English" }
        };
        options.SummarizationMode = SummarizationMode.Abstractive;
    });
});

#Inheritance

Object
DxBlazorReportingAIOptions
See Also