Problem with typed datasets and column expressions
-
I am having trouble using column expressions to return an aggregate of child rows in a typed dataset. Here is my scenario: I have two tables defined in my xsd schema: Orders and Order Details. The relevant fields are: Orders - OrderID (primary key) - Total (expression column) OrderDetail - OrderID (foreign key) - Qty - PricePerUnit - ItemTotal (expression column: Qty*PricePerUnit) my problem is that when I try to set the expression property of the Total column in "Orders" to "Sum(Child.ItemTotal)" and then run the dataset generator, I get the following error: The custom tool 'MSDataSetGenerator' failed. Unbound reference in the aggregate expression 'Sum(child.[ItemTotal])' I also get this error when referencing the foreign key constaint name: Sum(Child(FK_Orders2OrderDetails).ItemTotal)" The MSDN library says that my syntax is correct (look up DataColumn.Expression property) Any ideas? Thanks