X xinjia Unregistered / Unconfirmed GUEST, unregistred user! 2001-08-14 #2 .... sql.add('select sum(数值字段名) as 结果字段名 from .. where ..'); prepare open sumjg:=query1.fieldbyname('结果字段名').asstring write(sumjg);
.... sql.add('select sum(数值字段名) as 结果字段名 from .. where ..'); prepare open sumjg:=query1.fieldbyname('结果字段名').asstring write(sumjg);
Y yhm71 Unregistered / Unconfirmed GUEST, unregistred user! 2001-08-14 #3 取出用:sumresult:=Query1.fields.fields.asstring(asinteger ...); 在报表中打印出来,可用一个表达式将其放入一个QRDBText中
E eyes4 Unregistered / Unconfirmed GUEST, unregistred user! 2001-08-14 #4 在qreport中加一个QRDBText 在其onprint事件中加入QRDBText.value:=XXX; 即可