Home » Developer & Programmer » Forms » Group wise total of Block in oracle form
Group wise total of Block in oracle form [message #604489] Tue, 31 December 2013 07:38 Go to next message
irfankundi786@yahoo.com
Messages: 269
Registered: February 2009
Location: pakistan
Senior Member
i have a block with these column
srno,    fin-year     Ename     All_Amount        C_amount
1        2012-2013     A          50                10
2        2012-2013     B          30                10
3        2012-2013     C          10                20
=========================================================
Total                             90                40
============================================================
srno,    fin-year     Ename     All_Amount        C_amount
1        2013-2014     d         20                  5
2        2013-2014     F         30                 10
========================================================
                                 50                 15

i want to total block fin_year wise as i mention above how i can handled in block.
how i can add summary?

[EDITED by LF: applied [code] tags]

[Updated on: Tue, 31 December 2013 13:17] by Moderator

Report message to a moderator

Re: Group wise total of Block in oracle form [message #604497 is a reply to message #604489] Tue, 31 December 2013 08:19 Go to previous messageGo to next message
shahzad-ul-hasan
Messages: 615
Registered: August 2002
Senior Member
hope this fmb gives you clue.

[Updated on: Tue, 31 December 2013 08:21]

Report message to a moderator

Re: Group wise total of Block in oracle form [message #604498 is a reply to message #604489] Tue, 31 December 2013 08:22 Go to previous messageGo to next message
shahzad-ul-hasan
Messages: 615
Registered: August 2002
Senior Member
please view the attached file...
Re: Group wise total of Block in oracle form [message #604499 is a reply to message #604497] Tue, 31 December 2013 08:27 Go to previous messageGo to next message
shahzad-ul-hasan
Messages: 615
Registered: August 2002
Senior Member
Attached.
Re: Group wise total of Block in oracle form [message #604502 is a reply to message #604499] Tue, 31 December 2013 08:33 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
It appears you would benefit from remedial forum training.
You need to be smarter than the tools you are (ab)using.
Re: Group wise total of Block in oracle form [message #604504 is a reply to message #604499] Tue, 31 December 2013 08:40 Go to previous messageGo to next message
shahzad-ul-hasan
Messages: 615
Registered: August 2002
Senior Member
/forum/fa/11529/0/
Re: Group wise total of Block in oracle form [message #604506 is a reply to message #604502] Tue, 31 December 2013 08:53 Go to previous messageGo to next message
irfankundi786@yahoo.com
Messages: 269
Registered: February 2009
Location: pakistan
Senior Member
i think this not fullfill my requirement. please see my post i need the finyearwise sum

srno, fin-year Ename All_Amount C_amount

1    2012-2013   A      50         10
2    2012-2013   B      30         10
3    2012-2013   C      10         20
=========================================================
Total                   90         40
============================================================
srno, fin-year Ename All_Amount C_amount
1    2013-2014  d          20     5
2    2013-2014  F          30    10
========================================================
                           50    15

in one block this all is done need subtotal finyear...


[EDITED by LF: applied [code] tags]

[Updated on: Tue, 31 December 2013 13:21] by Moderator

Report message to a moderator

Re: Group wise total of Block in oracle form [message #604507 is a reply to message #604506] Tue, 31 December 2013 09:01 Go to previous messageGo to next message
shahzad-ul-hasan
Messages: 615
Registered: August 2002
Senior Member
Please check that links. this will help you.
https://community.oracle.com/thread/894708?start=0&tstart=0

http://psoug.org/reference/rollup.html

http://www.java2s.com/Code/Oracle/Analytical-Functions/ROWNUMBERreturnanumberwitheachrowinagroupstartingat1.htm
Re: Group wise total of Block in oracle form [message #604528 is a reply to message #604507] Tue, 31 December 2013 13:23 Go to previous messageGo to next message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Forms is not the right tool to do that. Reports, on the other hand, handles such stuff easily. Application Express' reporting capabilities (interactive report) as well.

If you want Forms to display data that way, create a view which would select such information, and then base Forms' data block on that view.
Re: Group wise total of Block in oracle form [message #604536 is a reply to message #604489] Tue, 31 December 2013 22:18 Go to previous messageGo to next message
shahzad-ul-hasan
Messages: 615
Registered: August 2002
Senior Member
Use this query.
SQL> ed
Wrote file afiedt.buf
  1   select distinct deptno,sum(sal)
  2         over (partition by deptno)
  3              sum(sal)
  4        from emp
  5*      order by deptno
SQL> /

    DEPTNO     sum(sal)
---------- ----------
        10       8750
        20      10875
        30       9400

revised fmb i will send you shortly.

[Updated on: Tue, 31 December 2013 22:19]

Report message to a moderator

Re: Group wise total of Block in oracle form [message #604550 is a reply to message #604536] Wed, 01 January 2014 01:46 Go to previous messageGo to next message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Maybe I'm wrong, but - your output doesn't look like the OP requested at all.
Re: Group wise total of Block in oracle form [message #604719 is a reply to message #604550] Fri, 03 January 2014 07:16 Go to previous message
mughals_king
Messages: 392
Registered: January 2012
Location: pakistan
Senior Member
Have you solved you problem Sir @littlefoot is right "Forms is not the right tool to do that. Reports" but you can handle this things easily by using "create view"


Regard
Mughal

Previous Topic: How many maximum pll can be attached to a form
Next Topic: Issue with Find button in Custom built Query Find form
Goto Forum:
  


Current Time: Fri Apr 19 15:10:24 CDT 2024