首页 > 其他 > 详细

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

时间:2019-11-22 16:52:26      阅读:431      评论:0      收藏:0      [点我收藏+]

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

  

 

 

 

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

原文:https://www.cnblogs.com/approx/p/11912141.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!