I am trying to print the subtotal for every category on the last page. Any idea on how I can achieve that?