Home » Developer & Programmer » Forms » Calculation without Summary Column (forms 6i)
Calculation without Summary Column [message #330062] Fri, 27 June 2008 08:43 Go to next message
cute_guy00
Messages: 5
Registered: May 2008
Location: chennai,India
Junior Member
Hi..

i'm working on forms 6i....
i> i've to calculate the sum of column(sal) and

ii> reflect the change in display item(Total_sal) if i do make change in Salary column, the total should change as i navigate through the column.

please help me out.... or suggest me some code...
Re: Calculation without Summary Column [message #330586 is a reply to message #330062] Mon, 30 June 2008 09:26 Go to previous messageGo to next message
averno9
Messages: 30
Registered: June 2008
Location: Spain
Member
You can use a WHEN-MOUSE-CLICK trigger in your table. Then, check if there's changes to be made. If there's none you don't do anything, but if there's any do a commit and update your column with sum. It's not a very good solution, but it works.
Re: Calculation without Summary Column [message #330625 is a reply to message #330586] Mon, 30 June 2008 11:22 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
WHEN-MOUSE-CLICK is about the worst you can pick.
First of all, it fires WAAAAAY too often
Secondly, people that use keyboard navigation don't trigger it.
Re: Calculation without Summary Column [message #330630 is a reply to message #330625] Mon, 30 June 2008 11:41 Go to previous messageGo to next message
averno9
Messages: 30
Registered: June 2008
Location: Spain
Member
Yes, that's why i said it's not very good. The problem of firing very often can be fixed putting it on the trigger of the field, but then, if you click a column that is not the one of the trigger, it doesn't work too.

Ummm... Maybe a timer would work too, but i think it's too complicated to put here a timer just for this. And doing a select every 5 seconds would be very slow in a huge DB.

Try to see wich events fire in your application. To enable this, go to tools -> preferences -> execution tab -> check debug messages.

In a regular application, when you insert something and just push down key or push the mouse button wherever, it doesn't fire any event, but for your specific application you could try to catch it.

Good luck.
Re: Calculation without Summary Column [message #330702 is a reply to message #330630] Mon, 30 June 2008 21:33 Go to previous messageGo to next message
wency
Messages: 450
Registered: April 2006
Location: Philippines
Senior Member

I don't know if I understand this question clearly. But try to total on when-validate-item trigger of salary column.
Re: Calculation without Summary Column [message #331039 is a reply to message #330062] Wed, 02 July 2008 03:45 Go to previous messageGo to next message
shahnirav86
Messages: 13
Registered: June 2008
Location: anand,gujarat
Junior Member

you to simply do the sum of sal textbox

it is database item. then you post on every key-next-item
then
select sum(sal) into :t_sum from tablename

Re: Calculation without Summary Column [message #333038 is a reply to message #330702] Thu, 10 July 2008 06:22 Go to previous messageGo to next message
cute_guy00
Messages: 5
Registered: May 2008
Location: chennai,India
Junior Member
./fa/4590/0/

i've attached the screen shot and have mentioned wat i need to achieve.
Now could u help me out!!
  • Attachment: 1.JPG
    (Size: 38.06KB, Downloaded 222 times)
Re: Calculation without Summary Column [message #333039 is a reply to message #330702] Thu, 10 July 2008 06:24 Go to previous messageGo to next message
cute_guy00
Messages: 5
Registered: May 2008
Location: chennai,India
Junior Member
./fa/4591/0/

this is wat i need...
  • Attachment: 2.jpg
    (Size: 725.68KB, Downloaded 278 times)
Re: Calculation without Summary Column [message #333048 is a reply to message #333039] Thu, 10 July 2008 06:46 Go to previous messageGo to next message
Littlefoot
Messages: 20896
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Did you consider use of the POST-CHANGE trigger on the "sal" item?
Re: Calculation without Summary Column [message #333082 is a reply to message #333048] Thu, 10 July 2008 08:22 Go to previous messageGo to next message
cute_guy00
Messages: 5
Registered: May 2008
Location: chennai,India
Junior Member
no
please suggest me some code...
that will be more helpful!!!
Re: Calculation without Summary Column [message #333102 is a reply to message #333048] Thu, 10 July 2008 09:05 Go to previous messageGo to next message
cute_guy00
Messages: 5
Registered: May 2008
Location: chennai,India
Junior Member
THANX IT WORKED!!!!
Re: Calculation without Summary Column [message #333191 is a reply to message #333102] Thu, 10 July 2008 15:20 Go to previous message
Littlefoot
Messages: 20896
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Lovely.

Now it's your turn - we tried to help you out, now you should share the solution with the rest of the community. Someone might benefit from it.
Previous Topic: Expandable / Collapsible Menu
Next Topic: ORA-12560 ........... How could it resolve ?
Goto Forum:
  


Current Time: Tue Dec 06 02:45:58 CST 2016

Total time taken to generate the page: 0.07852 seconds