How to pass a logo picture to .FR3 report design / FR VCL Delphi
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/