there is no cancel function on a sales order or a purchase order, so first things first, I guess you need to define what you mean by cancelled.
It could be that you have a modification in your system that allows a purchase order or sales order to be cancelled or maybe you are just talking about deleting an order that has not been completely fulfilled (one or more lines have an outstanding quantity).
Once we have determined what makes an order cancelled in your system (tell us what you do to cancel it) it will be fairly easy to offer some advice on how to report on the quantities.