Home End User
New Blog Posts: Merging Reports - Part 1 and Part 2

Converting database reports to .rtm files

edited January 2003 in End User
Dear Mr, Mrs,

I am trying to convert the reports that are stored in my table as blob
fields to .rtm files. But I get a errormessage: ETemplateSaveError; Cannot
store a template to a field of this type.

Anyone has a idea what I'am doing wrong?

I am using the following code:

Dm.ppDesigner.Report := Dm.ppReport; //Connects the designer to the
report.
with Dm.ppDesigner do
begin
with Dm.ppReport do
begin
//DataPipeline, Name, NameField, and TemplateField properties.
Template.DatabaseSettings.DataPipeline := Dm.ppReportTool;
Template.DatabaseSettings.NameField := 'Description';
Template.DatabaseSettings.Name := ReportName;
Template.DatabaseSettings.TemplateField:= 'ReportFile';
Template.LoadFromDatabase;

//Report loaded from database, let's save it to a RTM file.
Template.DatabaseSettings.DataPipeline := Nil;
Template.DatabaseSettings.NameField := '';
Template.DatabaseSettings.TemplateField:= '';
Template.FileName := 'c:\test\test.rtm';
Template.SaveToFile;
end; //with Dm.ppReport
end;

Comments

  • edited January 2003
    Ok, I have fixed the problem, but now a new one has show up.

    I got rtm files, but I seem to have lost all my detailed information like
    pipelines etc. Maybe I have missed something? A property that I need to set?

    Please reply,

    Best regards,


    Mischa E.J. Hoogendoorn

  • edited January 2003
    The data settings on the template should point to a database that exists
    when the report template file is loaded. What are the datasettings in the
    database configuration when you are running the tempaltes from teh end user
    designer? These settings will need to be available for hte file based
    templates in the same way they are needed for the end user database
    templates.


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.