On Save As
I am writing a custom save procedure. I am able to write code on
ppDesigner1.OnCustomSaveDoc where I proceed to save to database after
prompts, etc. However, this does not effect the report designer behavior if
the user selects File / Save / Save As. Selecting Save As .. creates a
dialog that list all reports, etc.
How can I override the Save As.. behavior to run the OnCustomSaveDoc event
or similar code?
Thanks,
Bob
ppDesigner1.OnCustomSaveDoc where I proceed to save to database after
prompts, etc. However, this does not effect the report designer behavior if
the user selects File / Save / Save As. Selecting Save As .. creates a
dialog that list all reports, etc.
How can I override the Save As.. behavior to run the OnCustomSaveDoc event
or similar code?
Thanks,
Bob
This discussion has been closed.
Comments
Try using the OnCustomSaveDoc event in the TppDesigner. The Sender object
in this event is the report with all the save options set up. All you will
need to do is worry about where you would like your report to be saved.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
not understand how to determine if the user selected Save, Save As, or Save
To File. Since the OnCustomSaveDoc event takes over for each of these, I
need to know which was selected and proceed accordingly. Can you further
clearify or provide an example of implementation?
Thanks,
Bob
As far as Save and SaveAs go, the designer treats them almost the same way.
It checks to see if the file already exists and then saves the report to the
specified location. You should not have to worry about the difference
between these two. To see if the user selected Save To File, you will need
to check the Report.Template.SaveTo property. If this enumerated type is
"stFile", the user selected Save To File. Check out the ReportBuilder
source in the ppDsgner.pas file to see how the Report Designer currently
handles report saving. This will give you a good starting point to creating
your own.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Thanks,
Bob Tucker