Sub-total & Grand-total in Report --Urgent--
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Sub-total & Grand-total in Report --Urgent--

  1. #1
    Join Date
    Jul 2001
    Posts
    334
    Hi,
    D2k is new product for me, I have a question for example

    select deptno, ename, sal, hiredate
    from emp

    I need the subtotal of sal by deptno & then grand total. How I can do that.

    Thanks in advance.

  2. #2
    Join Date
    Jan 2002
    Posts
    33
    1. Developer 2000 Reports Builder:
    select "group above" or "group left" in "STYLE" tab page,
    select "deptno" in "GROUPS" tab page,
    select "sal" then click "sum" in "TOTALS" tab page,
    you will get total sal of each deptno and grand total as well.

    2. If you use SQL, you can use "group by rollup(a, b)" or
    "group by cube(a,b)" function.





  3. #3
    Join Date
    Jul 2001
    Posts
    334
    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.





  4. #4
    Join Date
    Jul 2000
    Location
    india
    Posts
    213
    HI

    SElect the frame after which u want a page break...go into thr property sheet by right clicking on the frame...there u will find the property named PAGE BREAK after/before....make it yes/no as per ur requirement..

    hope this will help u

    thanks pras

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width