Table of Contents

VirtualDataTableState.TryAggregate Method

This method is used by the "AGGREGATE" tag in a FlexCel report to calculate the maximum/minimum/average/etc of the values in the table. If you don't implement this method, FlexCel will still calculate those values by looping through the dataset, but if you have a faster way to do it (like with a "select max(field) from table") then implement this method and return true.

Syntax

Namespace: FlexCel.Report

public virtual Boolean TryAggregate(TAggregateType aggregateType, Int32 colIndex, out Object resultValue)

Parameters

<-> Parameter Type Description
aggregateType TAggregateType Which operation to do on the dataset. (Max/Min/etc)
colIndex Int32 Index of the field in which we want to aggregate.
out resultValue Object Returns the result of the operation in the dataset. It should be null, a double or a datetime.

Returns

True if this method is implemented, false if not. Note that even if we return false here, FlexCel will still calculate the aggregate by looping through all the records.

See also