FastReport 自动换行与行高自适应及自动增加空行


设定后即可自动换行及行高自适应。版本号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.

  

 

 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM