Skip to main content

XtraReportBase.GetPreviousColumnValue(String) Method

Gets the previous value of the specified column in the report’s XtraReportBase.DataSource.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v24.1.dll

NuGet Package: DevExpress.Reporting.Core

Declaration

public object GetPreviousColumnValue(
    string columnName
)

Parameters

Name Type Description
columnName String

A String that is the name of the column whose value you want to retrieve.

Returns

Type Description
Object

An object that is the previous value of the specified column in the data source. If the specified column was not found, this method returns null (Nothing in Visual Basic).

Remarks

Use the GetPreviousColumnValue method to retrieve the value of the specified data column. You can call this method in the XRControl.BeforePrint event handler.

You can use the XtraReportBase.GetPreviousColumnValue<T>(String) method, which returns a strongly typed object, to eliminate the need to cast the returned object to the appropriate type.

When the current row is the first row (CurrentRowIndex == 0), this method returns the value of the first record.

See Also