*!* thisform.grid1.RecordSource = ""
*!* thisform.grid1.ColumnCount = -1
select 姓名,购买日期 , sum(总价) as 汇总价,SUM(进价*数量) as 进货总价 ,SUM(总价-进价*数量) as 毛利润,SUM(运费) as 总运费 from 客户订单 ;
WHERE
ALLTRIM(姓名) == ALLTRIM() AND 购买日期 = CTOD(thisform.text1.value) group by 姓名,购买日期 INTO cursor jg2
thisform.grid1.columncount=FCOUNT("jg2")
thisform.grid1.RecordSource = "jg2"
GO TOP IN jg2
thisform.grid1.AutoFit
thisform.grid1.Refresh