how to create band at runtime
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
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
regards
mr