Save ReportTemplate, but not the Data Model
When Designer saves the report template, it saves along the Data Model
together. I want to break this bond. I wish to save it separately. I know I
will encounter difficulty trying to recreate the datapipelines. I will
recreate all the nessesary data pipelines that is required for the report.
Before saving the data module, I do not save it as a BLOB, but I have to
structure the Data Module to my database and allow me to easily recreate the
nessesary pipelines.
The reason of my approach is I can reuse my data module for other reports.
Also, I can alter the data by showing dummy data to users while designing.
together. I want to break this bond. I wish to save it separately. I know I
will encounter difficulty trying to recreate the datapipelines. I will
recreate all the nessesary data pipelines that is required for the report.
Before saving the data module, I do not save it as a BLOB, but I have to
structure the Data Module to my database and allow me to easily recreate the
nessesary pipelines.
The reason of my approach is I can reuse my data module for other reports.
Also, I can alter the data by showing dummy data to users while designing.
This discussion has been closed.
Comments
property, just like a report has a template property. It is a dtm as
compared to an rtm. You can extract the datamodule from the report and free
it before you save the template to the database. Use the OnSaveStart of the
report template to free the datamodule. Call this method in the OnSaveStart
event handler:
{---------------------------------------------------------------------------
---}
{ TmyEndUserSolution.SaveDataModule }
procedure TmyEndUserSolution.SaveDataModule;
var
lDataModule: TdaDataModule;
begin
lDataModule := daGetDataModule(ppReport1);
if (lDataModule <> nil) then
lDataModule.Free;
end; {procedure, SaveDataModule}
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com