Home » Developer & Programmer » Forms » Sum of Amount with Items of Two different Groups (Oracle forms 6i, Database 10g express edition)
Sum of Amount with Items of Two different Groups Sat, 11 January 2020 06:10
 M HANIF Messages: 15Registered: April 2019 Junior Member
Assalam-o-Alaikum!

Dear experts!
I've Master Details form.
In detail form, I've items of two different groups...
I want to calculate the amount of each item according to the group...
Group 1 items amount =
Group 2 items Amount =
I'm feeling difficulty because summry function calculates total amount
Formula function doesn't allow where clause
How to do this?
Store record in display items and show it on execute_query
Thanks...
Re: Sum of Amount with Items of Two different Groups [message #678785 is a reply to message #678783] Sat, 11 January 2020 13:32
 Littlefoot Messages: 21549Registered: June 2005 Location: Croatia, Europe Senior MemberAccount Moderator
It seems that you'll have to do it manually, in a loop through the whole detail block, checking which group certain row belongs to and add the amount to appropriate variable (group_1_sum_amount or group_2_sum_amount). Once you're done, put those variables into block items so that they would be displayed on the screen.
Re: Sum of Amount with Items of Two different Groups [message #678787 is a reply to message #678785] Sun, 12 January 2020 11:23
 M HANIF Messages: 15Registered: April 2019 Junior Member
Littlefoot wrote on Sat, 11 January 2020 13:32
It seems that you'll have to do it manually, in a loop through the whole detail block, checking which group certain row belongs to and add the amount to appropriate variable (group_1_sum_amount or group_2_sum_amount). Once you're done, put those variables into block items so that they would be displayed on the screen.
Dear Brother!
I want to obtain the result like calculated item (the item having formula or summary function)...
On inserting record, it should behave like formula ..... on changing Quantity, amount should be changed...
 Previous Topic: Is it possible to get the table name from the user. Next Topic: set_alert_button_property (merged 2)
Goto Forum:

Current Time: Wed Apr 08 06:55:58 CDT 2020