Hi,
Try this:
Create a Formula with below content and place it in place of "Stock Level" field
numberVar current;
if RecordNumber = 1 then current := <Database field for Stock Level>
else if OnLastRecord then current := <Database field for Stock Level>
else
current := <Database field for Stock Level> - next(<Database field for Demand>);
current
Please replace the <Database field for...> with your actual database fields.
Also check whether on last record, you are getting proper value.
Hope this helps.
Thanks,
Raghavendra