SELECT Distinct Exchange FROM SEARCHREPORT WHERE !ISNULL(Exchange) GROUP BY EXCHANGE INTO CURSOR EXCHANGEWISEOUTSTANDING This.RowSourceType= 0 WITH This .AddItem('All Exchanges') GO Top SCAN Browse .AddItem(Searchreport.exchange) ENDSCAN ENDWITH This.Requery() Thisform.Combo1.Refresh Thisform.combo1.ListItemId=1I could see from the browse window that each record in cursor EXCHANGEWISEOUTSTANDING is scanned properly (Around 15 items).
*Combo Valid IF ALLTRIM(Thisform.combo1.Value)='All Exchanges' SELECT searchreport SET FILTER TO ELSE SELECT searchreport SET FILTER TO Exchange=ALLTRIM(UPPER(thisform.combo1.Value)) ENDIF SUM PREVBAL TO Total_PREVBAL SUM LASTPAYAMT TO Total_LASTPAYAMT SUM ADJAMT TO Total_ADJAMT SUM CURCHARGE TO Total_CURCHARGE SUM ACNTBAL TO Total_ACNTBAL SUM AMTPAYABLE TO Total_AMTPAYABLE COUNT FOR DELETED()#.T. GO TOP Thisform.grdsorting1.Setfocus Thisform.Refresh ***************** * Form INT() Select Searchreport SUM PrevBal TO Total_PrevBal SUM lastpayamt TO Total_lastpayamt SUM adjamt TO Total_adjamt SUM curcharge TO Total_curcharge SUM acntbal TO Total_acntbal SUM amtpayable TO Total_amtpayable SUM OSAMT TO Total_os Locate Thisform.grdsorting1.Refresh Thisform.Refresh ****** *Form Setfilter() LPARAMETERS exchange SET FILTER to SET FILTER TO Exchange=ALLTRIM(UPPER(thisform.combo1.Value)) GO top Thisform.grdsorting1.Refresh thisform.Refresh.