Copy Objects from one Report into another

Hi,
i have two reports, one of them has a "header", now i want to copy this header from sourcecode into my
main report, how could i do this?

source and dest are both TfrxPage Objects from two different *.fr3 Files
for x:=0 to source.Objects.count-1 do
begin
  dest.Report.Objects.Add(source.Objects[x]);
  TfrxComponent(dest.Objects[dest.Objects.Count-1]).Parent   := dest;
end;

if i do this like this example i get a null pointer exception from fastreport...
it seems that the base report in my copied object is not registered in the destination page...
in other words how could i do this:
    frxHeader := Tfrxheader.Create(page);
    frxHeader .CreateUniqueName;
    frxHeader .SetDefaults;

but instead to create a new object i like to add/copy a existing TfrxObject from another report into my main report
any ideas?

Comments

  • edited 11:28PM
    doncht wrote: »
    Not really sure where to start here but what version are you currently on if I may ask.
    Hi,
    im use the version 4.13.1

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.