bestlong 怕失憶論壇's Archiver

bestlong 發表於 2006-7-7 11:22

FastReport 明細表格補滿空白

[code]
procedure Footer1OnBeforePrint(Sender: TfrxComponent);
begin
  while Engine.freespace >20 do
  begin
    Engine.showband(child1)
  end;
end;
[/code]
将 footer 的 height = 0
ok

bestlong 發表於 2006-7-7 12:10

上列方法在網路上看到有人說在 FR3 中不可使用
是因為到了  PageFooter 時 FreeSpace 就變成 0 了.

bestlong 發表於 2006-7-7 12:16

若是用程式判斷固定資料行數,若是在會 Stretched 的狀況下有可能會因為列印補滿固定資料行數而超出一頁。

bestlong 發表於 2007-9-3 11:18

困擾多時的問題終於解決了

進入報表設計工具,在報表中加入一個 footerband 然後因為這個 footer 不需要顯示所以將 height 設為 0

接著使用下列程式碼:
[code]
procedure Footer1OnBeforePrint(Sender: TfrxComponent);
var i:integer;                                 
begin
  if int(Engine.FreeSpace/Child1.Height) > 0 then
  begin
    for i := 1 to int(Engine.FreeSpace/Child1.Height) do
    begin
      Engine.ShowBand(Child1);
    end;              
  end;            
end;
[/code]

此方法是我在 FastReport 4.2 下解決
頁: [1]

Powered by Discuz! X1.5 Archiver   © 2001-2010 Comsenz Inc.