Home End User

Save ReportTemplate, but not the Data Model

edited September 2002 in End User
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.

Comments

  • edited September 2002
    You can export the datamodules to the database. A datamodule has a template
    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

This discussion has been closed.