how to create band at runtime

ppmppm
edited September 2005 in FastReport 3.0
i need to create band at runtime in script - i cannot get correct result - band don't show.
it's possible ?
i try create on main unit code or at "onstartreport" event like this bellow code (based on first demo from examples) :


var
B : TfrxMasterData;
M : TfrxMemoView;

procedure Prep;
begin
B := TfrxMasterData.Create(nil);
B.Top := 100;
B.Height := 100;
B.Left := 0;
B.Width := Band1.Width;
B.Visible := True;
B.Dataset := Report.GetDataset('Customers');
B.PrintIfDetailEmpty := True;
B.Parent := Page1;
M := TfrxMemoView.Create(nil);
M.Parent := B;
M.Text := '[Customers."City"]';
M.Top := 0;
end;


procedure frxReport1OnStartReport(Sender: TfrxComponent);
begin
Prep();
end;

begin
end.


regards
mr

Comments

  • ppmppm
    edited 9:27AM
    i use OnManualBuild - and it's work - is this only way to display manual created band ?

    regards
    mr

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.