Home » Developer & Programmer » Forms » calculating the values
calculating the values [message #353110] Sat, 11 October 2008 10:21 Go to next message
kommerashashi
Messages: 23
Registered: November 2007
Junior Member
i have master block and detail block depends on the master block some values are populates for 1 column depends on the join condition



details block and the values

1 1000
2 2540
3 4875
4 547841


total =
here my problem is i have to calculate and sum of all the items which are populated in the detail block
for some other master block we have more than the above data in the detail block .

depends on the data its populating . one time it populates 2 columns ,another time 1 columns .....so here i have to do the sum( displayed data .......how to do that and in which trigger i have to write and can please paste the code .





iam requesting you in advance thanks

[Updated on: Sat, 11 October 2008 10:24]

Report message to a moderator

Re: calculating the values [message #353126 is a reply to message #353110] Sat, 11 October 2008 11:37 Go to previous messageGo to next message
Littlefoot
Messages: 20891
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Perhaps it is me who is incapable of understanding your question as I'm not sure whether you are talking about rows or columns, but - did you consider using Forms built-in "Calculation" item properties?

./fa/5144/0/
Re: calculating the values [message #353133 is a reply to message #353110] Sat, 11 October 2008 14:54 Go to previous messageGo to next message
subba99
Messages: 31
Registered: September 2008
Member
follow these steps u can easily got the solution
Method1

)SET Precompute summaries to YES under Advanced database in Property_pallet of Detail-block
2)place one TEXT-ITEM name it as T1 in detail-block and provide prompt as Total,open property pallet of T1
if it a number column set datatype=number,if u won't set datatype as number u get an error

Database item=no
Calculation mode=summary
summary function=sum
summarized block=name of detail-block
summarized-item=name of calculated item in that block
NOTE:1)place T1 item in separate control-block or place T1 in Detail block by providing Query all records =yes in DEtai-block property pallet
3)run the form...............now
The form displays the total vaules in T! field item Based on Relationship condition


Method2

you can do this by proving calculation mode=formula also but u need to write a PL/SQL statement

still if u have any errors contact me

Thanks and regards
---------------------
subbu

[Updated on: Sat, 11 October 2008 14:57]

Report message to a moderator

Re: calculating the values [message #353890 is a reply to message #353126] Wed, 15 October 2008 08:16 Go to previous messageGo to next message
kommerashashi
Messages: 23
Registered: November 2007
Junior Member
Dear Sir,


actually i want to calculate the cu,alative frequency of each and every row i have to calculate and i have to post into one non data base item.


my requirment is to calculate the cumalative frequency like

row values like :--


10
20
30
40


...so these are the row values .....i have to post these values like

10+20+30+40 = Non - data base item

please kindly send me the code logic ....

thanking you in advance
Re: calculating the values [message #353901 is a reply to message #353890] Wed, 15 October 2008 09:07 Go to previous messageGo to next message
subba99
Messages: 31
Registered: September 2008
Member
did u tried the above steps,it will calculate the sum of the itemvalue for all rows


Regards
----------
subbu
Re: calculating the values [message #354444 is a reply to message #353901] Sun, 19 October 2008 02:01 Go to previous messageGo to next message
kommerashashi
Messages: 23
Registered: November 2007
Junior Member
dear SUBBU,
i know it will calculate each and every row but i required manually please send me the pl/sql code for that
Re: calculating the values [message #354911 is a reply to message #354444] Tue, 21 October 2008 23:42 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Either loop through the records - start at the first record (row=1) and stop when 'last_record' is 'true', or do a 'select' on the table to get the information.

David
Previous Topic: How to close a window with close icon
Next Topic: Animated Image
Goto Forum:
  


Current Time: Sun Dec 04 10:55:04 CST 2016

Total time taken to generate the page: 0.17097 seconds