CalculatedField.GetValue Event

Occurs when a calculated field obtains its value, enabling you to return a custom value for this calculated field.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v18.2.dll

Declaration

public event GetValueEventHandler GetValue
Public Event GetValue As GetValueEventHandler

The event handler GetValueEventHandler receives an argument of the GetValueEventArgs type.

Property Description
Report

Provides access to a report which owns the calculated field, for which the CalculatedField.GetValue event was raised.

Row

Provides access to a data row whose data can be used in calculating a custom value for a calculated field in the CalculatedField.GetValue event handler.

Value

Gets or sets a value of a calculated field.

Although the CalculatedField.Expression property supports numerous standard functions, operators and constants, for some tasks these may not be enough. Handle the GetValue event, to make a calculated field return a value based on your custom expression.

The GetValueEventArgs class introduces the GetValueEventArgs.Value property, which accepts the final calculated value for a calculated field, and the GetValueEventArgs.Row and GetValueEventArgs.Report properties, which enable you to obtain any information required to calculate a value for a calculated field.

To learn more, see Calculated Fields Overview.

For code examples, refer to Grouping Data by Days of the Week (Runtime Sample) and Sorting Data by a Custom Field.

See Also