如何用fastreport   打印固定行数呢.现要求每张纸上打印20条数据,如果数据表中有12条数据,则自动补8条空白行;如数据表中有11条数据,则自动补9条空白行.我增加了一个band   指定一虚拟数据集和记录数,但是记录数只能固定设制,如何指定记录数=20-数据表记录数呢??

解决方案 »

  1.   

    17.FastReport如何打印表格式的空行?
    var
    PageLine: integer;       //在現在頁列印到第幾行
    PageMaxRow: integer=15;  //設定每頁行數
    procedure MasterData1OnBeforePrint(Sender: TfrxComponent);
    begin
    PageLine := <Line> mod PageMaxRow;
    if (PageLine = 1) and (<line> > 1) then
    Engine.newpage;
    child1.visible := False;
    end;//Footer1高度設為0
    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;
    Engine.ShowBand(Child1);  //印空白表格
    end;
    child1.visible := False;
    end;
    begin
    end.
    本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/bdmh/archive/2009/05/27/4219395.aspx
      

  2.   

    这段代码试过了,好像不行。
    还有,请问 高度設為0  这个Footer1是哪种啊?