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

Problems with Template.LoadFromFile

edited May 2004 in General
Hi

I have a TppReport on a form and have to load different RTM file's into it
more than twice into the TppReport. On some occasions, it will not load
these files into the template. I cannot work out why this is happening. Is
there anything you know of that would stop a template being loaded ?

--------

procedure TReportTreeFrm.OpenTemplate;
begin
OpenDialog.InitialDir := ExtractFilePath (Application.ExeName);

if OpenDialog.Execute then
begin
ppReport.Template.FileName := OpenDialog.FileName;
ppReport.Template.LoadFromFile;

if ppLabelNodeInfo.Caption <> '' then ProcessTemplate (True);
end; { if OpenDialog ... }
end;

--------

Thanks
Tony

Comments

  • edited May 2004
    Hi Tony,

    This is not a known issue with ReportBuilder. As a test, try tracing into
    this code to be sure the correct file name is being assigned to the
    Template.FileName. Also be sure the Template.FileName is not being reset in
    some of your other code... ProcessTemplate perhaps. If you are still having
    an issue, please send a simple example demonstrating the problem to
    support@digital-metaphors.com and I'll take a look at it for you.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited May 2004
    Nico

    I have spent 3 hours trying to debug this and I have tried all of your
    suggestion prior to you suggesting them and am still at a loss. The
    Template.FileName is getting changed correctly and ProcessTemplate does not
    reset it in any way.

    It is going to take serveral hours to cut this application down to something
    small enough for you to view. I will endevour to do this for you tommorow.

    Tony


This discussion has been closed.