Retriving totals taking more time [message #81795] |
Mon, 24 March 2003 01:25 |
Muzzammil
Messages: 99 Registered: February 2003
|
Member |
|
|
Hi experts,
The calculations is taking lot of time to calculate and insert into form fields.
My form is having :Itemcode,:totalsale,:Minsale,Maxsale,Avgsale.
I am selecting Itemcode from masterdata by moving next and previous rec. When I move to next it should calculating SUM(SALE), MIN(SALE), MAX(SALE, AVG(SALE) of that perticular selected itemcode.
SELECT SUM(SALE), MIN(SALE), MAX(SALE), AVG(SALE)
INTO :TOTALSALE,:MINSALE,:MAXSALE,:AVGSALE
FROM SALES
WHERE SALES.ITEMCODE=:ITEMCODE;
The calculating fine but from moving one record to another record its taking lot of time. Since, everytime it calculates more than 3000 records when I move to next or previous record.
Kindly tell me how to make fast calculations and moving records...
Thanks,
Syed Muzzammil.
|
|
|
Re: Retriving totals taking more time [message #81797 is a reply to message #81795] |
Mon, 24 March 2003 01:50 |
waris
Messages: 115 Registered: November 2001
|
Senior Member |
|
|
Hi Muzammil,
Why dont u use the Built in facility in Forms
by which u can get the Sum,Min,Max etc..
I think u can try using the calculated items..
Just go thru the calcalution part in the Item's property pallete..
Hope this helps you...
Cheers
waris
|
|
|
Re: Retriving totals taking more time [message #81804 is a reply to message #81795] |
Mon, 24 March 2003 07:40 |
waris
Messages: 115 Registered: November 2001
|
Senior Member |
|
|
Hi Muzammil,
U still can do ...there is no need for summarized item to be in current block...keep the summary item in control block...and use calcaltion feature..but u should be having a realtionship between the SALES and ITEMCODES table which i think u will have surely...if still u find the problem u send me ur form to waris99@yahoo.com...i would like to help u out..
Cheers
waris
|
|
|
|