Because you are getting the image data from a different source than the dataset 
itself, traditionally you do this in the event OnEnterRect which exists for 
this kind of situations, see for an example the Thumbnails Report in the 
lazreport/samples/editor sample, I quote here the relevant part:

procedure TfrmMain.TheReportEnterRect(Memo: TStringList; View: TfrView);
begin
  if (FImageList<>nil) and (View.Name='thumbnail') then begin
    TFrPictureView(View).Picture.LoadFromFile(FImageList[FImageListIndex]);
    Inc(FImageListIndex);
  end;
end;

In your case you could probably do something like this:

if View is TfrPictureView then begin
  TfrPictureView(View).Picture.LoadFromFile(
    'test' + myQuery.FieldByName('Test_Int').asString+'.bmp')
end;

Which looks more simply than your proposed solution.

Regards.

Jesus Reyes A.


--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to