images shown in preview but not printing

anfanf
edited 4:13AM in FastReport 3.0
Hello,

I assign images dynamically to a TfrxPictureView component in the report. They are correctly shown when calling ShowReport, and also when exporting to pdf or bmp. But they just disappear when printing the same report.

I assign the images in the OmBeforePrint event, like this:

procedure TForm.frxReport1BeforePrint(Sender: TfrxReportComponent);
var
bitmap: TBitmap;
begin

if (Sender.Name = 'Picture1') and (Sender is TfrxPictureView) then
begin
pic := TfrxPictureView( Sender );

bitmap := TBitmap.Create();
bitmap.LoadFromFile('file.bmp');

pic.Picture.Assign(bitmap);
bitmap.Free();
end

I use FastReport 3.09
What am I doing wrong? Any ideas?

Thanks


Comments

  • gordkgordk St.Catherines On. Canada.
    edited 4:13AM
    make sure that the printable property of the picture object is set to true.
    ;)
  • anfanf
    edited 4:13AM
    Yes, that was it. ;)
    Thank you

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.