XRChart.RegisterSummaryFunction(String, String, Int32, SummaryFunctionArgumentDescription[], SummaryFunction) Method

Obsolete. Registers the custom summary function with the specified settings.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v20.2.dll


[Obsolete("This method is obsolete now. Use the static RegisterGlobalSummaryFunction method instead.", false)]
public void RegisterSummaryFunction(
    string name,
    string displayName,
    int resultDimension,
    SummaryFunctionArgumentDescription[] argumentDescriptions,
    SummaryFunction function
<Obsolete("This method is obsolete now. Use the static RegisterGlobalSummaryFunction method instead.", False)>
Public Sub RegisterSummaryFunction(
    name As String,
    displayName As String,
    resultDimension As Integer,
    argumentDescriptions As SummaryFunctionArgumentDescription(),
    function As SummaryFunction


Name Type Description
name String

A String value containing the function's name.

displayName String

A String value containing the function's display name, which is used for localization purposes.

resultDimension Int32

An integer value representing the dimension of the resulting series point's values.

argumentDescriptions SummaryFunctionArgumentDescription[]

An array of SummaryFunctionArgumentDescription objects containing argument descriptions.

function SummaryFunction

A SummaryFunction delegate to be registered.


The RegisterSummaryFunction method is intended to register custom summary functions within a chart control. To unregister a specific summary function, the XRChart.UnregisterSummaryFunction method should be called. Also, you may remove all custom summary functions from the chart, and add all default functions to it by calling the XRChart.ResetSummaryFunctions method.


The following example demonstrates how to create a custom summary function, which returns a product of two values (Price * Count). To accomplish this task, it is required to create a summary function delegate and register it via the ChartControl.RegisterSummaryFunction method.

The code below illustrates how this can be done.

Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Threading.Tasks
Imports System.Windows.Forms

Namespace RegisterSummaryFunctionExample
    Friend NotInheritable Class Program

        Private Sub New()
        End Sub

        ''' <summary>
        ''' The main entry point for the application.
        ''' </summary>
        <STAThread> _
        Shared Sub Main()
            Application.Run(New Form1())
        End Sub
    End Class
End Namespace
See Also