hiya David,
Thanks for the reply.
Unfortunately, the code does not allow me to use the "CskStoreProductEntityUsingProductId" from intellisense:
Below is the code that you sent:
relationsToUse.Add(dalHamilton.EntityClasses.CskStoreOrderItemEntity.Relations.CskStoreProductEntityUsingProductId);
It seems that the "relations" will only let me select "CskStoreORDERntityUsingOrderId"
Actually, I have looked up the database and seen that (for some reason, there is no relatioship between:
CSK_Store_Product.productId
and
CSK_Store_OrderItem.productId
Maybe that is why llblGenPro can't see it?Below is the sql that gives me what I want llblGenPro to do.
What should I do now?Should I add the relationship in the sqlServer, or do it in llblGenPro designer..Maybe I can get llblGenPro to work without having to make any changes to the database?
SELECT SUM (CSK_Store_Product.specialDeliveryPrice * CSK_Store_OrderItem.quantity)
FROM CSK_Store_OrderItem
INNER JOIN CSK_Store_Product
ON CSK_Store_Product.productId = CSK_Store_OrderItem
. productId
WHERE CSK_Store_OrderItem
.OrderId = 13
GROUP BY CSK_Store_OrderItem.OrderId
Many thanks,
yogi