设定后即可自动换行及行高自适应。版本号5.6.2
1、masterData:属性值:stretched 为True
2、Memo设定wordwrap为True ,stretchMode:smMaxHeight
FastReport自动增加空行
1、在masterdata下增加child;
2、在code编写如下代码
var
PageLine: integer;//在現在頁列印到第幾行
PageMaxRow: integer =28;//設定每頁列數
procedure MasterData1OnBeforePrint(Sender: TfrxComponent);
begin
PageLine := <line> mod PageMaxRow; //对于固定行数这一句代码是必要的
if (PageLine = 1) and (<line> > 1) then
Engine.newpage;
Memo45.text:=inttostr(PageLine);
child1.visible := False;
end;
procedure Footer1OnBeforePrint(Sender: TfrxComponent);
var
i: integer;
begin
i := IIF(PageLine = 0, PageMaxRow, PageLine);
child1.visible := True;
while i < PageMaxRow do
begin
i := i + 1;
Memo61.text:=inttostr(i);
Engine.ShowBand(Child1);//印空白表格
end;
child1.visible := False;
end;
begin
end.