Home » Developer & Programmer » Reports & Discoverer » To sum up values of a column in lower group and add to value of column in higher group
To sum up values of a column in lower group and add to value of column in higher group [message #151363] Wed, 14 December 2005 08:01 Go to next message
sreedevi_83
Messages: 43
Registered: October 2005
Location: India
Member
Consider that I have a query divided into two groups
I have a forumula column in higher group.
I must add value of a column of lower group with that of formula column of higher group
suppose
In higher group i have value a
In lower group i have value b
under every value a i have many values of b let it be b1,b2,b3..
my output of report should be
a+b1
a+b1+b2
a+b1+b2+b3
if value of a changes.. we may have b4,b5,b6..
which should result as a+b4, a+b4+b5...
so my output must be
a+b1
a+b1+b2
a+b1+b2+b3
a+b4 (when value of a changes)
a+b4+b5
a+b4+b5+b6

Re: To sum up values of a column in lower group and add to value of column in higher group [message #151365 is a reply to message #151363] Wed, 14 December 2005 08:13 Go to previous messageGo to next message
kiran
Messages: 503
Registered: July 2000
Senior Member
Have a look at here.

--Kiran.
Re: To sum up values of a column in lower group and add to value of column in higher group [message #151378 is a reply to message #151365] Wed, 14 December 2005 09:22 Go to previous message
sreedevi_83
Messages: 43
Registered: October 2005
Location: India
Member
Kiran i could not resolve it even after seeing the link which u have specified.
let me ask you one in other way
In the lowest group, c_rep_amt is a formula column
For each record i want to sum it up and show in output.
So i have taken one place holder column cp_rep_amt_tot in the same lowest group and performed this function in a formula column in the same group
:cp_rep_amt_tot:=:cp_rep_amt_tot+TO_NUMBER(:c_rep_amt);
But when i do this i get
ORA-06502: PL/SQL: numeric or value error
My intention is
if suppose i have 100,201,350 as c_rep_amt
my output should be
c_rep_amt cp_rep_amt_tot
100 100
201 301
350 651

This is a part of my requirement. Can you help me in answering this?
Previous Topic: Open Word Document in PL/SQL
Next Topic: Printing report on multiple printers
Goto Forum:
  


Current Time: Wed Jun 26 09:45:57 CDT 2024