procedure TQueryBilForm.SetEyeDataSet(ADataSet: TClientDataSet);
var
I:Integer;
begin
if FieldComboBox.Items.Count<>0 then
FieldComboBox.Items.Clear;
FEyeDataSet:=ADataSet;
for I:=0 to FEyeDataSet.FieldCount-1 do
FEyeDataSet.Fields[I].DisplayLabel:=FieldList[I];
with FEyeDataSet do
begin
for I:=0 to FEyeDataSet.FieldCount -1 do
begin
if not Fields[I].Visible then Continue;
if not CanFilter(Fields[I]) then Continue;
FieldComboBox.Items.AddObject(Fields[I].DisplayLabel,Fields[I]);
end;
end;
FFilterStr:='';
end;
if ADOQuery6.Active=true then ADOQuery6.Close;
ADOQuery6.SQL.clear;
ADOQuery6.sql.add('select * from tab_kmmc order by c1');
adoquery6.open;
ComboBox1.Items.Clear;
if ADOQuery6.RecordCount>0 then
begin
for i:=1 to ADOQuery6.RecordCount do
begin
ADOQuery6.RecNo:=i;
ComboBox1.Items.Append(adoquery6.findfield('c1').asstring);
end;
end
if FieldComboBox.Items.Count<>0 then
FieldComboBox.Items.Clear;
FEyeDataSet:=ADataSet;
for I:=0 to FEyeDataSet.FieldCount-1 do
FEyeDataSet.Fields[I].DisplayLabel:=FieldList[I];
with FEyeDataSet do
begin
for I:=0 to FEyeDataSet.FieldCount -1 do
begin
if not Fields[I].Visible then Continue;
if not CanFilter(Fields[I]) then Continue;
FieldComboBox.Items.AddObject(Fields[I].DisplayLabel,Fields[I]);
end;
end;
FFilterStr:='';
if FieldComboBox.Items.Count<>0 then
FieldComboBox.Items.Clear;
FEyeDataSet:=ADataSet;
for I:=0 to FEyeDataSet.FieldCount-1 do
FEyeDataSet.Fields[I].DisplayLabel:=FieldList[I];
with FEyeDataSet do
begin
for I:=0 to FEyeDataSet.FieldCount -1 do
begin
if not Fields[I].Visible then Continue;
if not CanFilter(Fields[I]) then Continue;
FieldComboBox.Items.AddObject(Fields[I].DisplayLabel,Fields[I]);
end;
end;
FFilterStr:='';
if FieldComboBox.Items.Count<>0 then
FieldComboBox.Items.Clear;
FEyeDataSet:=ADataSet;
for I:=0 to FEyeDataSet.FieldCount-1 do
FEyeDataSet.Fields[I].DisplayLabel:=FieldList[I];
with FEyeDataSet do
begin
for I:=0 to FEyeDataSet.FieldCount -1 do
begin
if not Fields[I].Visible then Continue;
if not CanFilter(Fields[I]) then Continue;
FieldComboBox.Items.AddObject(Fields[I].DisplayLabel,Fields[I]);
end;
end;
FFilterStr:='';