Skip to main content
All docs
V25.2
  • ReportPromptToReportBehavior.RetryAttemptCount Property

    Specifies the number of attempts to fix report layout errors that may appear in the LLM response.

    Namespace: DevExpress.AIIntegration.Wpf.Reporting

    Assembly: DevExpress.AIIntegration.Wpf.Reporting.v25.2.dll

    NuGet Package: DevExpress.AIIntegration.Wpf.Reporting

    Declaration

    public int RetryAttemptCount { get; set; }

    Property Value

    Type Description
    Int32

    The number of attempts.

    Remarks

    Use the following properties to specify behavior’s settings:

    FixLayoutErrors
    Specifies whether to automatically resolve overlapping report controls.
    PredefinedPrompts
    Specifies predefined prompts that can be used to create a report in the Report Wizard.
    RetryAttemptCount
    Specifies the number of attempts to fix report layout errors that may appear in the LLM response.
    Temperature
    Gets or sets the balance between creativity and consistency in AI responses. Higher values increase variation.
    PromptAugmentation
    Specifies additional instructions that modify the prompt before processing.

    Attach the ReportPromptToReportBehavior to the WPF Report Designer to enable AI-powered Prompt-to-Report functionality:

    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" 
    xmlns:reporting="clr-namespace:DevExpress.AIIntegration.Reporting;assembly=DevExpress.AIIntegration.Reporting.Common.v25.2" 
    ... 
    <dxrud:ReportDesigner x:Name="designer">
        <dxmvvm:Interaction.Behaviors>
            <dxai:ReportPromptToReportBehavior Temperature="0.6" RetryAttemptsCount="5" >
                <dxai:ReportPromptToReportBehavior.PredefinedPrompts>
                    <reporting:AIReportPrompt Title="Custom Prompt" Text="Custom Text"/>
                </dxai:ReportPromptToReportBehavior.PredefinedPrompts>
            </dxai:ReportPromptToReportBehavior>
        </dxmvvm:Interaction.Behaviors>
    </dxrud:ReportDesigner>
    

    Code-Behind:

    using DevExpress.AIIntegration.Wpf.Reporting;
    using DevExpress.Mvvm.UI.Interactivity;
    using DevExpress.AIIntegration.Reporting;
    // ...
    public partial class MainWindow : Window {
        public MainWindow() {
            InitializeComponent();
            ReportPromptToReportBehavior reportBehavior = new ReportPromptToReportBehavior();
            // Set the number of attempts.  
            reportBehavior.RetryAttemptCount = 5;
            // Specify output randomness.
            reportBehavior.Temperature = 0.6f;
            // Add a custom prompt to the collection.
            var collection = reportBehavior.PredefinedPrompts;
            AIReportPrompt customPrompt = new AIReportPrompt();
            customPrompt.Title = "Custom Prompt";
            customPrompt.Text = "Custom Text";
            collection.Add(customPrompt);
            reportBehavior.PredefinedPrompts = collection;
            // Attach the behavior.
            Interaction.GetBehaviors(designer).Add(reportBehavior);
        }
    }
    

    Review the following help topic for more information on how to use this functionality in the WPF Report Designer: Prompt to Report Behavior in the WPF Report Designer (CTP).

    See Also