Skip to main content

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

OBSOLETE

This method is obsolete now. Use the static RegisterGlobalSummaryFunction method instead.

Registers the custom summary function with the specified settings.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v24.1.dll

NuGet Package: DevExpress.Reporting.Core

Declaration

[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
)

Parameters

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.

Remarks

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.

Example

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.EnableVisualStyles()
            Application.SetCompatibleTextRenderingDefault(False)
            Application.Run(New Form1())
        End Sub
    End Class
End Namespace
See Also