This example calculates summaries for the minimum ProductAmount values. Minimum values are calculated in a group defined by the year, a company and a product.
The example demonstrates two different approaches - the legacy approach that uses the CustomSummary event, and the approach avialble in the Optimized mode - an expression with the Aggr function.
Optimized Mode - Use the Aggr Function
This approach adds a PivotGrid field bound to the following expression:
Aggr(Min(Aggr(Min([ProductAmount]), GetYear([OrderDate]), [ProductName], [CompanyName])), GetYear([OrderDate]), [CompanyName])
Legacy Approach - Handle the CustomSummary Event
You can handle the CustomSummary event to calculate custom summaries. The code demonstrates how to get the underlying data, group them and calculate the summaries.
- CustomSummaryEventExample.aspx (VB: Default.aspx)
- CustomSummaryEventExample.aspx.cs (VB: Default.aspx.vb)
- AggrExpressionExample.aspx (VB: AggrExpressionExample.aspx)
(you will be redirected to DevExpress.com to submit your response)