Sorted by PartTran.trannum, with a formula to calc qty per trantype and summed those qty's with running total.
I used the Part transaction History tracker to verify the date/qtys & remember it being pretty obvious when I didn't handle a TranType correctly.
One tricky part might be if you have transfer orders, multiple plants.