Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
I need the report like below chart .can any one please suggest how to do this.
Manager | Reportee | Total Amount (Direct +Reportees) | Reportee Amount |
X | A | 100(A Direct Amount)+(Reportees 70+20+30)=210 | 110 |
A | B | 40 + (Reportees 10+20) =70 | 30 |
A | c | 20 | 0 |
A | D | 30 | 0 |
B | E | 10 | 0 |
B | F | 20 | 0 |
Reportees values need calculate dynamically based on manager and reportee tagging.
because my table structure have is like this .
can you explain bit more
hi Arul,
I have two tables one is user tagging and other one is user wise values.
like below
Table 1:
Manager | Reportee |
X | A |
A | B |
A | c |
A | D |
B | E |
B | F |
x |
Table 2:
User | Amount |
A | 100 |
B | 40 |
c | 20 |
D | 30 |
E | 10 |
F | 20 |
Now I need the report like below:
First Manager Should come:
Ex :
Manager Reportees Amount
X A 210
A B 70
A C 20
A D 30
B E 20
B F 10
The consideration for calculation should be like this..
For a manager the final amount should be the sum of his amount + sum of his Reportees amount ..
For example for B is manager as per the data he has to reportees so the amount will be calculated as
B's amount + Reportee's amount=40+20+10(B+E+F)=70
Also B is a reportee to Manger A . So Manager A amount will be
A's amount+ Reportess[B+C+D] amount i.e 100+70+20+30=210
Hope now it is clear..
Perhaps this discussion helps: BOM Explosion using Hierarchy & HierarchyBelongsTo