Hi
You need to check what the code is doing while it runs
In the classic client, Click on tools -> debugger -> and make sure both options are ticked
Then run the report and use F8 to step through the code while looking at the record values in the bottom section of the debugger, check to see if the system is finding the released production order and retrieving the date.
You should see what the issue is by using the debugger
Cheers
Nev