Import Design Layers
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
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
This discussion has been closed.
Comments
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;
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com