SELECT SLHD.VOUCH_CODE,SLHD.VOUCH_DATE,SLHD.VOUCH_NUM,SUM(SLTXN.CALC_NET_AMT) AS AMT,ACT.ACT_NAME,SUM(SLTXN.TOT_QTY) AS QTY
FROM SL_HEAD20132014 AS SLHD,ACCOUNTS AS ACT,SL_TXN20132014 AS SLTXN
WHERE SLHD.ACT_CODE=ACT.ACT_CODE AND SLTXN.VOUCH_CODE=SLHD.VOUCH_CODE
GROUP BY SLHD.VOUCH_CODE,SLHD.VOUCH_DATE,SLHD.VOUCH_NUM,ACT.ACT_NAME
ORDER BY SLHD.VOUCH_DATE
i want to print total quatity and total sale in grid when data changes
like
date amount quantity
01/02/2013 1200 1
01/02/2013 200 1
01/02/2013 1400 2 // date changes here
02/03/2013 100 1
02/03/2013 50 4
02/03/2013 150 5 // date changes and so on