Z zbfan Unregistered / Unconfirmed GUEST, unregistred user! 2001-05-12 #1 用QUERY (SELECT SUM(*) AS TOTAL FROM *)动态查出的数据 在DBGRID中显示; ???如何才能把动态查出的TOTAL 列的合计数据 加起来 给一个 ’EDIT.TEXT ‘
用QUERY (SELECT SUM(*) AS TOTAL FROM *)动态查出的数据 在DBGRID中显示; ???如何才能把动态查出的TOTAL 列的合计数据 加起来 给一个 ’EDIT.TEXT ‘
T terry_lzs Unregistered / Unconfirmed GUEST, unregistred user! 2001-05-12 #2 edit.text:=inttostr(query1.fieldbyname('Total').value);
Z zhengzhijia Unregistered / Unconfirmed GUEST, unregistred user! 2001-05-12 #3 edit.text := query1.fields[0].asstring;
Z zbfan Unregistered / Unconfirmed GUEST, unregistred user! 2001-05-12 #4 total 列可能有数十行,上面的方法只可用于一行,NO,NO ;;;;;
F fan_7 Unregistered / Unconfirmed GUEST, unregistred user! 2001-05-12 #5 定义一个全局变量,在OnCalcFields时,将total列累加.. iSum := iSum + Query.FieldByName('total').AsInteger
Z zbfan Unregistered / Unconfirmed GUEST, unregistred user! 2001-05-24 #12 没办法:菜鸟看——————我用的是)))) i,s :integer; s :=0; with query1do begin for i :=0 to query1.recordcount-1do s := s+ query1.fieldbyname('xy').asinteger; query1.next ; end;
没办法:菜鸟看——————我用的是)))) i,s :integer; s :=0; with query1do begin for i :=0 to query1.recordcount-1do s := s+ query1.fieldbyname('xy').asinteger; query1.next ; end;