Skip to main content
All docs
V25.1
  • AIReportingConfigurationBuilder.AddPromptToExpressionConverter() Method

    Activates AI-powered Prompt-to-Expression functionality in the Web Report Designer.

    Namespace: DevExpress.AspNetCore.Reporting

    Assembly: DevExpress.AIIntegration.AspNetCore.Reporting.v25.1.dll

    NuGet Package: DevExpress.AIIntegration.AspNetCore.Reporting

    Declaration

    public AIReportingConfigurationBuilder AddPromptToExpressionConverter()

    Returns

    Type Description
    AIReportingConfigurationBuilder

    A DevExpress.AspNetCore.Reporting.AIReportingConfigurationBuilder object that can be used to further configure the AI-powered functionality in Web Document Viewer and Web Report Designer.

    Remarks

    The following code activates the Prompt-to-Expression Converter in an ASP.NET Core application:

    // ...
    builder.Services.AddSingleton(chatClient);
    builder.Services.AddDevExpressAI((config) => {
        config.AddWebReportingAIIntegration(options =>
            options.AddPromptToExpressionConverter());
    });
    

    Filter Editor and Expression Editor now display an AI button that invokes the Prompt-to-Expression Generator. In the invoked window, enter an expression prompt in natural language and click Generate.

    Web Report Designer - AI-powered Prompt-to-Expression Converter

    You can edit the generated expression in the Generator window and apply it when ready.

    The AI model generates expressions based on the report-specific expression syntax. The model has access to the data source schema, report layout, and any custom functions registered in your application. You can refer to these elements in your prompts. Detailed prompts increase output quality.

    See Also