How to increase the speed in Runtime?
It's slowly...
procedure TForm1.Button1Click(Sender: TObject);
var
LFXPCOM:TfrxPage;
LFXMCOM:TfrxMemoView;
i,j:integer;
begin
frxReport1.Clear;
LFXPCOM:=TfrxReportPage.Create(Self);
LFXPCOM.Parent:=frxReport1;
for i:=1 to 77 do
for j:=1 to 100 do
begin
LFXMCOM:=TfrxMemoView.Create(Self);
LFXMCOM.Parent:=LFXPCOM;
LFXMCOM.HAlign:=haCenter;
LFXMCOM.VAlign:=vaCenter;
LFXMCOM.Frame.Typ:= [ftLeft,ftRight,ftTop,ftBottom];
LFXMCOM.SetBounds(i*10,j*10,10,10);
LFXMCOM.Memo.Text:='A';
end;
frxReport1.ShowReport(true);
end;
procedure TForm1.Button1Click(Sender: TObject);
var
LFXPCOM:TfrxPage;
LFXMCOM:TfrxMemoView;
i,j:integer;
begin
frxReport1.Clear;
LFXPCOM:=TfrxReportPage.Create(Self);
LFXPCOM.Parent:=frxReport1;
for i:=1 to 77 do
for j:=1 to 100 do
begin
LFXMCOM:=TfrxMemoView.Create(Self);
LFXMCOM.Parent:=LFXPCOM;
LFXMCOM.HAlign:=haCenter;
LFXMCOM.VAlign:=vaCenter;
LFXMCOM.Frame.Typ:= [ftLeft,ftRight,ftTop,ftBottom];
LFXMCOM.SetBounds(i*10,j*10,10,10);
LFXMCOM.Memo.Text:='A';
end;
frxReport1.ShowReport(true);
end;
Comments
try this approach
procedure TForm1.Button1Click(Sender: TObject);
var
LFXPCOM:TfrxPage;
LFXMCOM:TfrxMemoView;
databand:tfrxmasterdata;
i,j:integer;
begin
frxReport4.Clear;
LFXPCOM:=TfrxReportPage.Create(frxreport1);
LFXPCOM.CreateUniqueName;
;
DataBand := TfrxMasterData.Create(lfxpcom);
DataBand.CreateUniqueName;
DataBand.RowCount :=100;
DataBand.Top := 10;
DataBand.Height := 10;
j:= 1;
for i:=1 to 77 do
begin
LFXMCOM:=TfrxMemoView.Create(databand);
LFXMCOM.CreateUniqueName;
LFXMCOM.SetBounds(i*10,j*10,10,10);
LFXMCOM.HAlign:=haCenter;
LFXMCOM.VAlign:=vaCenter;
LFXMCOM.Frame.Typ:= [ftLeft,ftRight,ftTop,ftBottom];
LFXMCOM.Memo.Text:='A';
end;
frxreport1.ShowReport;
end;
My program had posted is just to explain that it's very slowly. In fact, I will set Memo different value with calculating result.
It's very fast in FastReport 2.X even if I am creating 20000 objects. It takes no more than 10 seconds.