Loading a picture at runtime
Hi
I'm Using Delphi 7, Report Builder 10.06,
Have a client that has multiple companies and we have a number of reports
that need Logo's.
The reports are the same - only the logo alteres for each company
The logo's are stored as JPG files and the location and name are stored in
global variables loaded from an ini file.
I am using "imgLogo.Picture.Graphic.LoadFromFile(gsLogo)" and this works
when the TppReport has the report with the imgLogo in it but when you alter
another report without the imgLogo it will not compile with the following
message :-
[Error] uReportBuilder.pas(4133): Undeclared identifier: 'imgLogo'
How can I get aroung this?????
Thanks Rob
I'm Using Delphi 7, Report Builder 10.06,
Have a client that has multiple companies and we have a number of reports
that need Logo's.
The reports are the same - only the logo alteres for each company
The logo's are stored as JPG files and the location and name are stored in
global variables loaded from an ini file.
I am using "imgLogo.Picture.Graphic.LoadFromFile(gsLogo)" and this works
when the TppReport has the report with the imgLogo in it but when you alter
another report without the imgLogo it will not compile with the following
message :-
[Error] uReportBuilder.pas(4133): Undeclared identifier: 'imgLogo'
How can I get aroung this?????
Thanks Rob
This discussion has been closed.
Comments
One quick option would be to perform a report object loop and check to
see if the imgLogo TppImage is present before loading the picture.
http://www.digital-metaphors.com/rbWiki/Delphi_Code/Layouts/Report_Object_Loop
The easiest option of course would be to keep this code local to the
report(s) containing the image (using RAP in RB Enterprise).
Moving forward, we hope you will consider upgrading to the latest
version of ReportBuilder. We have many new and exciting features available.
http://www.digital-metaphors.com/rbWiki/General/What's_New/RB_12
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com