Files to look at:
See the How to: Calculate a Property Value Based on Values from a Detail Collection help topic for more information.
See Also:
XPO Best Practices
How to display details collections with descendant classes filtered by object type in a DetailView