This is just a clarifying question:
Mainform.cs, starting at line 81
// get all order prices
ResultsetFields orderPricesFields = new ResultsetFields(2);
orderPricesFields.DefineField(OrderDetailsFieldIndex.OrderID, 0, "OrderID");
orderPricesFields.DefineField(OrderDetailsFieldIndex.ProductID, 1, "OrderPrice", "", AggregateFunction.Sum);
IExpression productPriceExpression = new Expression(
EntityFieldFactory.Create(OrderDetailsFieldIndex.Quantity),
ExOp.Mul,
EntityFieldFactory.Create(OrderDetailsFieldIndex.UnitPrice));
orderPricesFields[1].ExpressionToApply = productPriceExpression;
IGroupByCollection groupBy = new GroupByCollection();
groupBy.Add(orderPricesFields[0]);
I think I follow all of this except for line 84. Why was ProductID selected? It doesn't seem to be used for anything, and I used Discount instead, and it doesn't appear to have altered the outcome at all. Am I correct in my assumption that the productPriceExpression overrides this value?
Thanks.