ppImage names.?
Hi guys
We use Delphi 7 and Report Builder Pro
We have previously shipped a report template to users with ppImage1,
ppImage2,ppImage3,ppImage4,ppImage5 in place...
We 'squirt' image information to the images at run time in code. Works
great....
In the last few years users may have added their own image to the
template which will have be named ppimage6 .. Works great....
In addition to the 5 images included originally we have now added
support for a further ten images from our product so we now 'squirt'
extra code to populate these images ppimage6,ppImage7,ppImage8,ppImage9
etc, etc..
The problem is that where users have already assigned ppimage6 to their
own logo image...this is now being overwritten with the image that we
have now defined in code...(obviously)...
So, without having to manually add the extra ten images to a clients
template...and then add image 16 and reassign that to the logo image
what can we do?
I can see no way for users to rename the ppImage6 to something else
(except re-naming the UserName which doesnt solve the issue).
We throw ourselves at the mercy of anyone reading this post...
Thanks in advance for any assistance. (I'm sure there is an easy answer
it's such a great product).
Regards
Glenn Greatwood
Key-Data Systems
We use Delphi 7 and Report Builder Pro
We have previously shipped a report template to users with ppImage1,
ppImage2,ppImage3,ppImage4,ppImage5 in place...
We 'squirt' image information to the images at run time in code. Works
great....
In the last few years users may have added their own image to the
template which will have be named ppimage6 .. Works great....
In addition to the 5 images included originally we have now added
support for a further ten images from our product so we now 'squirt'
extra code to populate these images ppimage6,ppImage7,ppImage8,ppImage9
etc, etc..
The problem is that where users have already assigned ppimage6 to their
own logo image...this is now being overwritten with the image that we
have now defined in code...(obviously)...
So, without having to manually add the extra ten images to a clients
template...and then add image 16 and reassign that to the logo image
what can we do?
I can see no way for users to rename the ppImage6 to something else
(except re-naming the UserName which doesnt solve the issue).
We throw ourselves at the mercy of anyone reading this post...
Thanks in advance for any assistance. (I'm sure there is an easy answer
it's such a great product).
Regards
Glenn Greatwood
Key-Data Systems
This discussion has been closed.
Comments
ReportBuilder does not give the end-user access to the Name property to
prevent the possibility of creating a conflict and breaking a report.
Ideally the developer should give all report components meaningful names so
these conflicts do not arise. Moving forward I recommend changing the
default names of the images before shipping a report template.
One option for existing reports would be to loop through your users'
templates after they have been loaded and check the component names manually
to be sure there are no conflicts. This could be done using a report object
loop and template events.
http://www.digital-metaphors.com/rbWiki/Delphi_Code/Layouts/Report_Object_Loop
http://www.digital-metaphors.com/rbWiki/Design/Templates/Using_Template_Events
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Hi Nico I fully understand.
Is it possible for us to rename (in code) an existing image if exists?
ie we loop through, see if ppImage6 exists and if it does rename it to
ppUserLogo ? That would solve the issue!
thanks
Glenn
Yes, using the methods described in the articles I posted, you should be
able to loop through the report, search for a component with a specific name
and change it before adding your own component with the same name.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com