<html>
<body>
<table>
<tr>
<th>
Customer
</th>
<th>
Order Price
</th>
</tr>
&lt;&lt;foreach [in customers]&gt;&gt;
<tr> <!-- Repeated master row. -->
<td>
<b>&lt;&lt;[CustomerName]&gt;&gt;</b>
</td>
<td>
&lt;&lt;[Order.Sum(c =&gt; c.Price)]&gt;&gt;
</td>
</tr>
&lt;&lt;foreach [in Order]&gt;&gt;
<tr> <!-- Repeated detail row. -->
<td>
<i>&nbsp;&nbsp;&lt;&lt;[Product.ProductName]&gt;&gt;</i>
</td>
<td>
&lt;&lt;[Price]&gt;&gt;
</td>
</tr>
&lt;&lt;/foreach&gt;&gt;
&lt;&lt;/foreach&gt;&gt;
<tr> <!-- Footer row. -->
<td>
<b>Total:</b>
</td>
<td>
&lt;&lt;[Sum(
  m =&gt; m.Order.Sum(
    c =&gt; c.Price))]&gt;&gt;
</td>
</tr>
</table>
</body>
</html>