Clone Page


I am trying to clone one page and then change something on the cloned page.

My goal is almost the same like but I need it for Delphi. My progress so far is shown below.

  //ClonedPage := TfrxReportPage.Create(Report1);

  ClonedPage := TfrxReportPage.Create(nil);



  for I := 0 to ClonedPage.AllObjects.Count - 1 do





If the page is created with owner Report1, the value of ClonedPage.AllObjects.Count is zero and the cloned page is blank. When I create it with nil owner, the Count of AllObjects is more than zero, but I cannot find a way to attach the page to the report to see if this method works.

Please, help!


  • PolomintPolomint Australia


    Have tried "inheritance"?

    The Reports in our biggest Project are all based on inheritance from a Template Unit, and aTemplate FR3 File. All of the common functionality is in one Delphi Unit. This allows us to have a common look, feel and behaviour.

    It gets a bit more complicated when we throw changes from Portrait to Landscape, Charts instead of Text, and Simple Reports vs. Composite ones.

    But it works well and means we can quickly make global changes to reporting (e.g. content of page footers) as we as one-off / report-specific amendments (e.g. colour of alternating grid lines).

    It does mean you need to set up for this from the start; it is a pain to convert an existing suite of reports to this approach. But I have done it - once!

    Cheers, Paul

  • Hello, thanks for your response. I tried to use inheritance, but if I understood the concept correctly, it requires to use separate fm3 files. In my case this was a deal breaker. Anyway, I found solution for the problem, which took me at least 6 hours of trials and errors.

    procedure DuplicateFastReportPages(aReport: TfrxReport);


     lvTempPage, lvClonedPage: TfrxReportPage;

     lvPageIndex, lvObjIndex : Integer;


     for lvPageIndex := 1 to aReport.PagesCount - 1 do


      lvTempPage := TfrxReportPage.Create(nil);



       for lvObjIndex := 0 to lvTempPage.AllObjects.Count - 1 do


       //Add new page to the report  

       lvClonedPage := TfrxReportPage.Create(aReport);








  • PolomintPolomint Australia


    Glad you worked out a solution that fits your requirements!

    I expect the investment of "six hours of trial and error" will pay you back many times over. 🤓

    Cheers, Paul

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.