D
dean_2008
Unregistered / Unconfirmed
GUEST, unregistred user!
q:=0;
for h:=0 to 13do
begin
sql3:='select * from 情况 where 号码='''+XjPrint_Num+''' and 名称='''+kc[h]+'''';
for w:=rxnf to rxnf+nj-1do
begin
cz.Connection:=conn;
cz.Close;
cz.SQL.Clear;
cz.SQL.Add(sql3+'and 年='''+inttostr(rxnf)+'-'+inttostr(rxnf+1)+'''');
cz.Open;
if cz.RecordCount<>0 then
begin
mq:=TfrMemoView(frReport1.FindObject(inttostr(q+1)+inttostr(h+1)+'1'));
mq.Memo.Text:=cz.FieldValues['总评'];
mq:=TfrMemoView(frReport1.FindObject(inttostr(q+1)+inttostr(h+1)+'2'));
mq.Memo.Text:=cz.FieldValues['第二总评'];
mq:=TfrMemoView(frReport1.FindObject(inttostr(q+1)+inttostr(h+1)+'3'));
mq.Memo.Text:=cz.FieldValues['年总评'];
cz.Next;
//这里面循h不能跟着外面进行循环
end;
rxnf:=rxnf+1;
q:=q+1;
end;
end;
for h:=0 to 13do
begin
sql3:='select * from 情况 where 号码='''+XjPrint_Num+''' and 名称='''+kc[h]+'''';
for w:=rxnf to rxnf+nj-1do
begin
cz.Connection:=conn;
cz.Close;
cz.SQL.Clear;
cz.SQL.Add(sql3+'and 年='''+inttostr(rxnf)+'-'+inttostr(rxnf+1)+'''');
cz.Open;
if cz.RecordCount<>0 then
begin
mq:=TfrMemoView(frReport1.FindObject(inttostr(q+1)+inttostr(h+1)+'1'));
mq.Memo.Text:=cz.FieldValues['总评'];
mq:=TfrMemoView(frReport1.FindObject(inttostr(q+1)+inttostr(h+1)+'2'));
mq.Memo.Text:=cz.FieldValues['第二总评'];
mq:=TfrMemoView(frReport1.FindObject(inttostr(q+1)+inttostr(h+1)+'3'));
mq.Memo.Text:=cz.FieldValues['年总评'];
cz.Next;
//这里面循h不能跟着外面进行循环
end;
rxnf:=rxnf+1;
q:=q+1;
end;
end;