Jump to content
We've recently updated our Privacy Statement, available here ×

roll up subtotals inline in recursive sub-report


rste

Recommended Posts

I have a hierarchical set of tasks in a database table.  Each task has a field for time spent and can have 0 or more sub-tasks. 

I have been able to set up a recursive sub-report to display an indented hierarchy with one line per task.

I'd like to display on each line the total time spent for the task + the time spent on all sub-tasks (multi-level).

There must be a simple way to do this but I cannot seem to find it.

Any ideas?

Code:
Database tables-----------------------| task   | time_spent |-----------------------|  1     |     2      ||  2     |     4      ||  3     |     8      ||  4     |     16     ||  5     |     32     ||  6     |     64     |----------------------------------------------| parent |    child   |-----------------------|  1     |     2      ||  1     |     3      ||  2     |     4      ||  4     |     5      ||  3     |     6      |-----------------------desired resultsTask1       126 hrs     --Task2      52 hrs ----Task4    48 hrs ------Task5  32 hrs --Task3      72 hrs ----Task6    64 hrs 
Link to comment
Share on other sites

  • 4 weeks later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...