Programmable/Conditional Headers/Footer in Report

More
2 years 1 month ago #24026 by prashant
Hi,

I am generating offer letters for one of three companies , assume the record exists like below , how to make make header image file dynamic 

Company Name | Candidate Name | Company_header
Firkee|Peter|C:\header\firkee.jpg
ETL-tools.com|John\C:\header\etl-tool.jpg

I
 

Please Log in or Create an account to join the conversation.

More
2 years 1 month ago #24027 by prashant
OK , I played with Chatgpt slightly and I was able to get the following solution where information is hardcoded at least , now we need to figure out how to load this from a. column value 

procedure HeaderBandOnBeforePrint(Sender: TfrxComponent); begin   if <ADOQUERY."join_company"> = 'Firkee Accessos' then                 Picture1.Picture.LoadFromFile('C:\Users\Superadmin\Downloads\header_firkee_accessories.jpg')   else   Picture1.Picture.LoadfromFile('C:\Users\Superadmin\Downloads\footer_firkee_accessories.jpg')                                                                                                                                                                                                                                                                                                   end;

begin end.

 
The following user(s) said Thank You: Peter.Jonson

Please Log in or Create an account to join the conversation.

More
2 years 1 month ago #24030 by Peter.Jonson
The easiest way to print picture dynamically is to use filelink

Here is an example

 

PS I understand you struggle, the report documentation is not comprehensive enough 

Peter Jonson
ETL Developer

Please Log in or Create an account to join the conversation.

More
2 years 1 month ago #24034 by prashant

PS I understand you struggle, the report documentation is not comprehensive enough 

Thank you for the trick !

It's just so this(FastReport) is complex without example it's even more difficult to comprehend what can be done.

Thank you again for posting answer

Please Log in or Create an account to join the conversation.

More
2 years 3 weeks ago #24134 by prashant

The easiest way to print picture dynamically is to use filelink
 
We were able to use the logo variable to dynamically insert the files. Once we roll this properly across, I will make a video to showcase this.

FILELINK works only in pictures file or at other areas also ? if yes examples if any

Please Log in or Create an account to join the conversation.

More
2 years 3 weeks ago #24135 by admin
FILELINK works only in pictures file or at other areas also ? if yes examples if any

What are other areas?

Mike
ETL Architect

Please Log in or Create an account to join the conversation.

Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Read more
Marketing
Set of techniques which have for object the commercial strategy and in particular the market study.
Google
Accept
Decline
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Google Analytics
Accept
Decline
Functional
Tools used to give you more features when navigating on the website, this can include social sharing.
Advertisement
If you accept, the ads on the page will be adapted to your preferences.
Google Ad
Accept
Decline
Save