Change leftmargin at runtime

Have you a nice day.

I want change the margin at runtime from my delphi berlin.
I use the fastreport VCL last version.

var
Page: TfrxReportPage;
begin
page := TfrxReportPage(frxMyReport.FindComponent('Page1'));
Page.LeftMargin:=20;
Page.RightMargin:=10;
Page.TopMargin:=10;
Page.BottomMargin:=10;
frxMyReport.ShowReport;
end;

For me doesn't work fine
Thanks a lot

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 5:43AM
    try
    var
    Page: TfrxReportPage;
    Page :=frxMyReport .Pages[1] as TfrxReportPage;
  • gpigpi
    edited 5:43AM
    or
    page := TfrxReportPage(frxMyReport.FindObject('Page1'));
    

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.