saving a report to a database
When I am saving a report template to a database I need to save some
other data into some seperate colums of the table. I have set the
template.datapipeline, ...name, templatefield properties, but before I
call save to database, I would like to save a description into a column
name desc which is in the same table and on the same record as the
template. How do I store the values of other fields so that when I save
the report these other columns of data are stored also?
other data into some seperate colums of the table. I have set the
template.datapipeline, ...name, templatefield properties, but before I
call save to database, I would like to save a description into a column
name desc which is in the same table and on the same record as the
template. How do I store the values of other fields so that when I save
the report these other columns of data are stored also?
This discussion has been closed.
Comments
it will works...
thanks...
but if this is the best that there is I guess it will have to do. There
should be a template.database.fieldbyname or
template.database.tablenamefieldname.asstring := 'report description';
have to rely on putting data in public variables and pulling this data into
the fields just before posting. I would rather put all if the data in at one
event or set of properties at one time and in one location. Surely Tom, Nard,
or Jim will have a better solution. If this is not the case, I will use this
event. Let's hear from Digital Metaphors on this.
Template object which you can use to customize the save process. From your
description, it sounds like you need to use the OnSaveStart event.
In terms of the data to be saved, it all comes down to the location of
object containing the data. Is it in the same form where the OnSaveStart
event handler is declared? If so, it's easy enough to retrieve it and set
the database field value. If not you'll need to come up with an OOPy
technique to do it...
--
Tom Ollar
Digital Metaphors Corporation
-------------------------------------------------------
Tech Tip: Controlling Designer New, Save, Open actions
-------------------------------------------------------
There are several options for controlling the actions
that occur when a user opens, saves, or creates a new report.
1. Use Report.Template events: OnLoadStart, OnLoadEnd,
OnSaveStart, OnSaveEnd and OnNew.
These events are frequently used to add additional functionality - such
as saving and reading additional meta data when a report loads. They are
also used for performing initializations when a report loads or a new
report is created.
2. Use the TppDesigner.OnOpenDoc and OnSaveDoc.
If you code event-handlers for these events, then the ReportDesigner
will rely on your event-handler code to load and save reports rather
than its own internal logic.
3. Use the TppDesigner.Menu property to access the menu items and attach
you own event-handlers.
--
Tech Support mailto:support@digital-metaphors.com
Digital Metaphors http://www.digital-metaphors.com
-------------------------------------------------------
There are several options for controlling the actions
that occur when a user opens, saves, or creates a new report.
1. Use Report.Template events: OnLoadStart, OnLoadEnd,
OnSaveStart, OnSaveEnd and OnNew.
These events are frequently used to add additional functionality - such
as saving and reading additional meta data when a report loads. They are
also used for performing initializations when a report loads or a new
report is created.
2. Use the TppDesigner.OnOpenDoc and OnSaveDoc.
If you code event-handlers for these events, then the ReportDesigner
will rely on your event-handler code to load and save reports rather
than its own internal logic.
3. Use the TppDesigner.Menu property to access the menu items and attach
you own event-handlers.
--
Tech Support mailto:support@digital-metaphors.com
Digital Metaphors http://www.digital-metaphors.com
http://www.digital-metaphors.com
info@digital-metaphors.com
a username, and some additional information when the report is save into the
database. I am surprised that there are no additional array properties that
would permit this. That said, this seems like a better place for me to do
this work.