How to Show subreport total in main report on the same column of that row?
Hi i have one main report **report1** and subreport **report2** . For ex: main report will shows all the departments details and with drilldown feature it also shows all the employees under each department(here i created **report2** i.e our subreport,which is expect **deptno** from main report and shows all the emp details under each dept ). my requirement is i need to show **the total salary** of employees in each dept row of main report .(the emp 'sal' column is havingt he report2 ie,subreport) i tried with creating the same dataset of subreport in main report and try to display the total sal in the dept row of main report,but its not working ,because we need to pass the deptno to that dataset as parameter which is the same deptno of that row. please give me some suggestions on this txs @ng
It could be quite simple. You can change the current data-set for main report to include the aggregated salary i.e. something like SELECT DEPARTMENTID, DEPARTMENTNAME....REQUIREDFIELDS, (SELECT SUM(SALARY) FROM EMPLOYEETABLE E WHERE E.DEPARTMENTID = D.DEPARTMENTID) DEPTTOTALSALARY FROM DEPARTMENT D This way the parametrized query would work correctly.