Loading BackPicture at runtime

edited 9:07AM 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

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.