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

Replacing TppReportTemplate

edited August 2003 in General
Is it possible to replace the TppReportTemplate ?

I would like to build my own load and save function for the report Template.
The Designer.OnCustomOpenDoc did't match for me.

regards
Andreas

Comments

  • edited August 2003
    Hi Andreas,

    How are the Load and Save functions insufficient for your needs? The
    TppReportTemplate class in embedded and cannot be replaced. Please let me
    know what your ultimate goal is and I'll try to find a work-around for you
    as quickly as possible.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited August 2003
    I would like to load and save the report template to and from a
    MemoryStream.
    For the main report it works fine with the OnCustomOpenDoc,
    But i use a subreport in my main form which i load dynamically an the
    ReportBeforePrint event

    SubReport1.Report.Template.DataBaseSettings.Name := 'SchriftKopf';

    SubReport1.Report.Template.LoadFromDataBase;

    How can i do this to load from a MemoryStream ? (Without replaceing the
    template ?)

    The next point, how can i enable the "Save" and "Open" and "Save To"
    menuitems in the Report Designer when i don't use a DataPipelin in the
    Template.Databasesettings ? (When i remove the DataPipeline, the menu items
    allways gets disabled .... )

    thanxs in advance

    Andreas





  • edited August 2003
    Hi Andreas,

    It is possible to load and save a template from a MemoryStream using the
    TppTemplate.LoadFromStream routine. I am not fully clear about what is
    happening to prevent you from loading a template from stream and then
    dynamically adding a template from database to a subreport in your main
    report. You could possibly load the template from database and save it to
    stream first, then load it as you need it throughout the process of your
    application.

    Be sure you have the TppDesigner.AllowSaveToFile property set to True to
    enable all the file menu items. Also be sure that your
    Report.Template.SaveTo property is set to stFile rather than stDatabase.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.