Thanks for the solution, it works fine but let me explain to you our report format:

EMPNO DEPT ENAME SAL HIREDATE page1
==== === ==== === =======
2313 10 SMITH 3200 12-FEB-90
6575 10 ALEN 2500 18-APR-94
------
5700
------
* Now at this point page should be new and sum by DEPT before printing next page.

EMPNO DEPT ENAME SAL HIREDATE Page2
==== === ==== === =======
8797 20 JACOB 1800 15-AUG-90
0967 20 BRIAN 3000 20-MAY-90
4575 20 DONA 5000 21-JUN-90
------
9800
------

Grand Total 15500


* We need continuously DEPT No. As above, NOT
10 .....
.....

20 ......
......
......

This is what we want exactly.
Thanks in advance.