Calculation without Summary Column [message #330062] |
Fri, 27 June 2008 08:43  |
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   |
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 #330630 is a reply to message #330625] |
Mon, 30 June 2008 11:41   |
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.
|
|
|
|
|
|
|
|
|
|
|