Comparing fields from two data sets

stefquestefque Serbia
edited 12:53AM in FastReport 4.0
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...

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.