New Blog Post: PDF/A and Metadata

Import Design Layers

edited January 2012 in End User
Hey,

can someone help me to import Design layers in a existing report via code?

The following code gives an exception after the open dialog.

tmpDesignLayer := report.DesignLayers.Add();
tmpDesignLayer.Template.ImportFromFile; <-- Exeption

The exception message:
Adress violation at adress: 0079F3E0 in module "rbRCL1415.bpl". Read of
adress 000000D8


Thanks,

Christian

Comments

  • edited January 2012
    Hi Christian,

    Loading layer templates is similar to loading report templates. You
    need to define a file location before loading the template.

    var
    lLayer: TppDesignLayer;
    begin
    lLayer := ppReport1.DesignLayers.Add;
    lLayer.Template.FileName := 'C:\Temp\pagelayer1.ltm';
    lLayer.Template.LoadFromFile;

    ppReport1.Print;

    end;

    Best Regards,

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