var<br> Y,M,D,ID : String;<br> i : Integer;<br> c1,c2,c3 : Currency;<br>begin<br> Y:=FormatdateTime('yyyy', Now);<br> M:=FormatdateTime('mm', Now);<br> D:=FormatdateTime('dd', Now);<br> if RadioButton1.Checked then begin<br> ADOQuery1.SQL.Clear;<br> ADOQuery1.SQL.Add('select * from Sell_Main,Sell_Minor '+<br> 'where Sell_Main.InvoiceID=Sell_Minor.InvoiceID '+<br> 'and Sell_Main.SellDate >=:A and Sell_Main.SellDate <=:B '+<br> 'and Sell_Main.Hang Order By Sell_Minor.InvoiceID');<br> ADOQuery1.Parameters.ParamByName('A').Value:=Y+'-'+M+'-'+D+' 00:00:00';<br> ADOQuery1.Parameters.ParamByName('B').Value:=Y+'-'+M+'-'+D+' 23:59:59';<br> ADOQuery1.Open;