Dynamically Pages in Delphi

Hi,

I need to dynamically change the order of the pages when displaying some report with Delphi.

Is it possible to do?

My Delphi version is 10.1.

Thanks.

Comments

  • Use

    var p, dest_page: TfrxReportPage;

    begin

    //there are Page1 and Page2 in the frxReport1

    p := TfrxReportPage.Create(frxReport1);

    frxReport1.Objects.Remove(p);

    dest_page := TfrxReportPage(frxReport1.FindObject('Page2'));

    frxReport1.Objects.Insert(frxReport1.Objects.IndexOf(dest_page), p);

    end;

  • Use

    var p, dest_page: TfrxReportPage;

    begin

    //there are Page1 and Page2 in the frxReport1

    p := TfrxReportPage.Create(frxReport1);

    frxReport1.Objects.Remove(p);

    dest_page := TfrxReportPage(frxReport1.FindObject('Page2'));

    frxReport1.Objects.Insert(frxReport1.Objects.IndexOf(dest_page), p);

    end;

    Thanks! This makes sense.

  • hello

    why you are not playing on the visible property of the pages?

    var paga: TFrxpage;

    ......

    frxReport1.LoadFromFile('........fr3');

    if ..... then

    begin

    paga:= frxReport1.Pages[57] as TFrxpage;

           paga.Visible :=false;

    end;

    Thanks

Leave a Comment