Loading backPicture at runtime

edited 3:18PM in FastReport VCL 5
Hello,

I need to display a picture and put memos object over it.
Cause the picture will cover all the page i'm using the BackPicture page property.
If I load the BackPicture image in the designer the picture is clearly diplayed in the preview and clearly printed.
If I set the BackPicture at runtime the picture is displayed and printed with a very poor definition.
Following the code I'm using to load the picture at runtime:

Page := TfrxReportPage(LayoutReport.Pages[1]);
FileName := ExtractFilePath(Application.ExeName)+ 'reports\layouts\myImage.jpg';
Page.BackPicture.LoadFromFile(FileName);
Page.BackPictureVisible := True;
Page.BackPicturePrintable := True;
Page.BackPictureStretched := True;

If I set the BackPictureStretched to False at runtime the image is dispalyed in the right way.
It seems the BackPictureStretched parameters works in a different way if the image is loaded in the designer than is the image is loaded at runtime.

Is there a way to load a streched backpicture at runtime and get the same definition as it is loaded at design time?

Thank you,
Davide

Leave a Comment