I think you will have to use a sub report if you cannot make a stored procedure to do the calculations outside the report.
I assume your data is set so you have a field that is a stock type another field with quantity ordered.
You could create a subreport that runs at the end of each grouping on day and does the calculations. Rather than using shared variables to try and pass amounts back and forth just make the sub report rerun for a wider date range each group.
link the sub report on the day but change the sub report select statment to use a date range.
Edited by DBlank - 20 Aug 2013 at 10:49am