Clear Report Template
After loading a report template from a database I want the user to be
able to be aboe to run the report again, but using the defaut report
compiled into the .exe rather then the template. However, once the user
loads the template once, I can change templates but I cannot figure
out how to get the default report (compiled into .exe) back without
closing the form and opening it again.
I set all the Report.Template props to '' but that does not work. It
still runs the last template loaded or a new tempplate if the user
selects it. Thnaks.
--
David Farrell-Garcia
Whidbey Island Software, LLC
able to be aboe to run the report again, but using the defaut report
compiled into the .exe rather then the template. However, once the user
loads the template once, I can change templates but I cannot figure
out how to get the default report (compiled into .exe) back without
closing the form and opening it again.
I set all the Report.Template props to '' but that does not work. It
still runs the last template loaded or a new tempplate if the user
selects it. Thnaks.
--
David Farrell-Garcia
Whidbey Island Software, LLC
This discussion has been closed.
Comments
- in the OnCreate event of the form, add some code to save the report
definition to a memory stream.
example:
FReportStream := TMemroyStream.Create;
myReport.Template.SaveToStream(FReportStream);
- to restore the report at a later time....
FReportStream.Position := 0;
myReport.Template.LoadFromStream(FReportStream);
--
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
That worked perfectly Nard. Thank you.
--
David Farrell-Garcia
Whidbey Island Software, LLC