procedure TForm1.Button2Click(Sender: TObject);
begin
ADOQuery3.Close;
ADOQuery3.SQL.Clear;
ADOQuery3.SQL.Add('select * from 数据库');
ADOQuery3.Open; TfrxPictureView(frxReport1.FindObject('Picture2')).picture.loadfromfile(ADOQuery3.Fields[4].Value);
frxReport1.ShowReport;
end;//ADOQuery3.Fields[4].Value是图片文件路径,但是这样的话,只会打印一个图片,在这里要如何写这样的循环呢?
begin
ADOQuery3.Close;
ADOQuery3.SQL.Clear;
ADOQuery3.SQL.Add('select * from 数据库');
ADOQuery3.Open; while not ADOQuery3.EOF do
begin
TfrxPictureView(frxReport1.FindObject('Picture2')).picture.loadfromfile(ADOQuery3.Fields[4].Value);
frxReport1.ShowReport;
next;
end;
end;