customize standard InventAging report
You really need to use the debugger to find out where your code fails. Please tell us if you don't know how to do it; we can help you.
Start by putting a breakpoint at the line with insert() and check if the fields are populated as expected. If not, look at the other variables. For example, maybe you already failed to find the VendTable record, or maybe even the InventTable record. When you know which values are wrong, continue your debugging to find out why. If you can't resolve the problem on your own, share all the information you collected with us.
As you see, just trying to guess what's wrong is not a good approach. You made no progress with that, so maybe you should start taking our advice seriously.