private void QueryableDataProvider_PrepareDescriptionForField(object sender, Telerik.Pivot.Core.PrepareDescriptionForFieldEventArgs e)
        {
            if (e.DescriptionType == DataProviderDescriptionType.Group && e.FieldInfo.DisplayName == "ShipCountry")
            {
                var description = e.Description as QueryablePropertyGroupDescription;

                if (description != null)
                {
                    var americanOrdersCalculatedItem = new AmericanOrdersSum();
                    americanOrdersCalculatedItem.GroupName = "American Orders Sum";
                    description.CalculatedItems.Add(americanOrdersCalculatedItem);

                    var europeanOrdersCalculatedItem = new EuropeanOrdersSum();
                    europeanOrdersCalculatedItem.GroupName = "European Orders Sum";
                    description.CalculatedItems.Add(europeanOrdersCalculatedItem);
                }
            }
            else if (e.DescriptionType == DataProviderDescriptionType.Group && e.FieldInfo.DisplayName == "OrderDate - Quarter")
            {
                var description = e.Description as QueryableDateTimeGroupDescription;

                if (description != null)
                {
                    var firstHalfYearCalculatedItem = new OrdersFirstHalfYear();
                    firstHalfYearCalculatedItem.GroupName = "First Half Year";
                    description.CalculatedItems.Add(firstHalfYearCalculatedItem);

                    var secondHalfYearCalculatedItem = new OrdersSecondHalfYear();
                    secondHalfYearCalculatedItem.GroupName = "Second Half Year";
                    description.CalculatedItems.Add(secondHalfYearCalculatedItem);
                }
            }
        }
        private void QueryableDataProvider_PrepareDescriptionForField(object sender, Telerik.Pivot.Core.PrepareDescriptionForFieldEventArgs e)
        {
            if (e.DescriptionType == DataProviderDescriptionType.Group && e.FieldInfo.DisplayName == "ShipCountry")
            {
                var description = e.Description as QueryablePropertyGroupDescription;

                if (description != null)
                {
                    var americanOrdersCalculatedItem = new AmericanOrdersSum();
                    americanOrdersCalculatedItem.GroupName = "American Orders Sum";
                    description.CalculatedItems.Add(americanOrdersCalculatedItem);

                    var europeanOrdersCalculatedItem = new EuropeanOrdersSum();
                    europeanOrdersCalculatedItem.GroupName = "European Orders Sum";
                    description.CalculatedItems.Add(europeanOrdersCalculatedItem);
                }
            }
            else if (e.DescriptionType == DataProviderDescriptionType.Group && e.FieldInfo.DisplayName == "OrderDate - Quarter")
            {
                var description = e.Description as QueryableDateTimeGroupDescription;

                if (description != null)
                {
                    var firstHalfYearCalculatedItem = new OrdersFirstHalfYear();
                    firstHalfYearCalculatedItem.GroupName = "First Half Year";
                    description.CalculatedItems.Add(firstHalfYearCalculatedItem);

                    var secondHalfYearCalculatedItem = new OrdersSecondHalfYear();
                    secondHalfYearCalculatedItem.GroupName = "Second Half Year";
                    description.CalculatedItems.Add(secondHalfYearCalculatedItem);
                }
            }
        }