I don't see that you're ever initializing TotalScrap to 0 before trying to add to it. This means its initial value is null and adding a value to null gives a result of null. I would create a new formula to do this and place it in the Report Header section:
WhilePrintingRecords;
Shared NumberVar TotalScrap := 0;
-Dell