sql.Text :='select * from kucun where 卡类='''+ CCardType.Text+''' ';//and 日期>='+datetostr(dtpbegin
.Date)+' and 日期<='+datetostr(dtpend.
Date);
//+' group by 卡类,面值价';
open;
while not eofdo
begin
with ADOQCostdo
begin
sql.Text :='select 面值 from card where 卡品名='''+ CCardType.Text+'''';
open;
CardesNum:=ADOQCost.RecordCount*2;
setlength(Cardes,CardesNum );
i:=0;
while not eofdo
begin
if (ADOQSale['面值价']=ADOQCost['面值']) then
begin
cardes:=cardes+ADOQSale['数量'];
cardes[i+1]:=ADOQSale['成本价'];
end;
i:=i+2;
next;