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

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

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v18.1.dll


[Obsolete("This method is obsolete now. Use the static RegisterGlobalSummaryFunction method instead.", false)]
public void RegisterSummaryFunction(
    string name,
    string displayName,
    ScaleType resultScaleType,
    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,
    resultScaleType As ScaleType,
    resultDimension As Integer,
    argumentDescriptions As SummaryFunctionArgumentDescription(),
    function As SummaryFunction


Type Name Description
String name

A String value containing the function's name.

String displayName

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

ScaleType resultScaleType

A ScaleType enumeration value representing the type of the function's result.

Int32 resultDimension

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

SummaryFunctionArgumentDescription[] argumentDescriptions

An array of SummaryFunctionArgumentDescription objects containing argument descriptions.

SummaryFunction function

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