How to pass a logo picture to .FR3 report design / FR VCL Delphi

MtkMtk
edited June 2022 in FastReport VCL

Hi,

I am still a starter when it comes to FR and have created my first report templates/designs and saved them as .FR3 files. These reports will be used by different customers with their own logos. Now I would like to find a way to place a picture (frxPictureView, I guess) on the page header and load it with/pass to it a right logo picture per customer on the fly.

I would appreciate very much if somebody would share how this functionality could be accomplished.

Best regards,

Markku

Comments

  • Please directly check the demo provided by FastReport, which shows all of them.

  • Unfortunately, FR technical support was not of much help in this topic, but for anyone who is interested I got it working in the following way:

    -On the Delphi side save the logo picture in a file and write it on the disk

    -With the Report Designer creatd a tfrxPictureView.Picture1 in the ReportTitle

    -Code following PascalScript in the OnBeforePrint event related to the Picture1:

    procedure Picture1OnBeforePrint(Sender: TfrxComponent);

    begin

     try

      picture1.picture.loadfromfile(ExtractFilePath(Application.ExeName)+ '\Reports\Logo.jpg');

     except

     end;

    end;

    -The Try-Except block prevents an exception message to appear to the user if the file containing a logo does not exists.

    Cheers,

    Markku

  • This forum is cold now. Ecology is really no good.

  • This forum is cold now. Ecology is really no good.

    Use ticket system https://support.fast-report.com/tickets/new/

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.