Reorder pages

Is it possible to create a new page in code, and have it displayed as the first page?

I have a multi-page report, and depending on certain conditions, I may need to create a page in code and display it as the first page. Presently, I'm doing the following:

procedure TForm7.frxReport1BeginDoc(Sender: TObject);
var
APage: TfrxReportPage;
begin
APage := TfrxReportPage.Create(frxReport1);
APage.CreateUniqueName;

AMemo := TfrxMemoView.Create(APage);
AMemo.CreateUniqueName;
...
end;


However, this page is always displayed as the last page. Any way I can get it to display as the first page?

Thanks in advance.

Comments

  • gpigpi
    edited 3:19AM
    Use
    frxReport1.Objects.Move(frxReport1.Objects.IndexOf(frxReport1.Pages[frxReport1.PagesCount - 1]), 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.