Resetting report after call to template.loadfromfile
I have a report that is embedded in a form. It works fine.
On rare occasions the user can select a different template to load.
After this template has been used, is there any way to revert back to the
original report info that was stored in the form?
Currently I have to load the default report from a .rtm file, but I have
found a situation where I can not easily get the .rtm file, and using the
report stored in the form would be ideal.
I could probably use 2 separate TppReport objects, but I'd prefer not to
if there is a simple way to reset the report. I tried the Reset and
ResetDevices methods, but I don't think they apply to this issue.
TIA,
J.D. Mullin
Advantage
--- posted by geoForum on http://delphi.newswhat.com
On rare occasions the user can select a different template to load.
After this template has been used, is there any way to revert back to the
original report info that was stored in the form?
Currently I have to load the default report from a .rtm file, but I have
found a situation where I can not easily get the .rtm file, and using the
report stored in the form would be ideal.
I could probably use 2 separate TppReport objects, but I'd prefer not to
if there is a simple way to reset the report. I tried the Reset and
ResetDevices methods, but I don't think they apply to this issue.
TIA,
J.D. Mullin
Advantage
--- posted by geoForum on http://delphi.newswhat.com
This discussion has been closed.
Comments
When you load a template into a report object, the current report definition
is completely replaced. If you would like to revert back to the original
report, you will need to keep a copy of it (as a template file or separate
report object) before you load the different template and load it back when
you need to.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
J.D.
--- posted by geoForum on http://delphi.newswhat.com