Change name picture

edited 8:41AM in FastReport 4.0
HJi

I find the method to change the picture name inside my report with dephi XE2 code.




my code

var

PictureView: TfrxPictureView;
Image: TImage;
frxReport1: TfrxReport;

begin
....
...

image:=' c:\rep\logo.jpg'; //<<<<................ error here
PictureView := frxReport1.FindObject('Picture1') as TfrxPictureView;
PictureView.Picture := Image.Picture;


I have error

Thank you for your help


Mario

Comments

  • gpigpi
    edited 8:41AM
    wrote:
    image:=' c:\rep\logo.jpg'; //<<<<................ error here
    But you can't assign TImage object with string
    Use
    TfrxPictureView(frxReport1.FindObject('Picture1')).Picture.LoadFromFile(' c:\rep\logo.jpg');
  • edited 8:41AM
    gpi wrote: »
    gpi wrote: »
    image:=' c:\rep\logo.jpg'; //<<<<................ error here
    But you can't assign TImage object with string
    Use
    TfrxPictureView(frxReport1.FindObject('Picture1')).Picture.LoadFromFile(' c:\rep\logo.jpg');

    Thank you

    Your anwser was very good


    I very appr?©ciate jour help.

    Thank again


    Mario

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.