Displaying Totals only in a Table

Can anyone help with displaying only the Subtotals and Grand Total in a table?

I have a lot of detail lines that need not be displayed but should have the data in those lines included in the totals.