Comparing fields from two data sets
stefque
Serbia
I am trying something like this
var
ds, ds1, ds2: TfrxDataset;
c,i,j: Integer;
istoje : boolean;
begin
ds := Report.GetDataset('MYDACQuery1');
ds1 := Report.GetDataset('MYDACQuery3');
ds2 := Report.GetDataset('MYDACQuery4');
c:=ds.recordcount;
ds1.First;
while not(ds1.Eof) do
begin
istoje:=False;
ds.First;
while not(ds.eof) do
begin
if ds.FieldByName('jmbg').AsString=ds1.FieldByName('jmbg').AsString then
istoje:=True;
ds.Next;
end;
if istoje=false then
c:=c+1;
ds1.next;
end;
But it says that I don't have an identificator at FieldByName so I don't know what could be the problem...
var
ds, ds1, ds2: TfrxDataset;
c,i,j: Integer;
istoje : boolean;
begin
ds := Report.GetDataset('MYDACQuery1');
ds1 := Report.GetDataset('MYDACQuery3');
ds2 := Report.GetDataset('MYDACQuery4');
c:=ds.recordcount;
ds1.First;
while not(ds1.Eof) do
begin
istoje:=False;
ds.First;
while not(ds.eof) do
begin
if ds.FieldByName('jmbg').AsString=ds1.FieldByName('jmbg').AsString then
istoje:=True;
ds.Next;
end;
if istoje=false then
c:=c+1;
ds1.next;
end;
But it says that I don't have an identificator at FieldByName so I don't know what could be the problem...