Calculate a calculate column in detail table : How to calculate sum of calcoulated column in detail table
Ex.
In employee view add  column as "calculate column type" his name is "avragesal" it calculate salary*20% 

How can calculate sum "avragesal"for each department

For more explain
In  employee view

Dep_id.    Name.       Salary.    avragesal 


100.          Jone.         1000.          200


100.          XXX.           3000.         600


100.          Zzz.             2000.        400


200.          Ttt.              500.           100


200.          Hhh.            700.          140


200.          Ooo.            1200.         240



Iwana in department view

Dep_id.         Sumavragesal


100                     1200


200                      480

