Hello Nick,
I would iterate through your data store and put each program ID into a Read a record module, which is configured like this:
By mapping the Collection to projects:tasks:actualWork, the module will provide a bundle for each program which includes all projects and their tasks.
After that comes the tricky part. You need to work with two iterators, one on the projects array and one the corresponding task array.
To sum everything up, you will need a Numeric aggregator module. The problem is to get the total sum on all operations, so you could work with a variable starting as an empty array, which the result from each operation are added to.
I am quite sure, that there are some optimization possiblities, but at the moment I do not find the perfect solution. I will think about it again and get back to this thread.
Regards
Lars