zoukankan      html  css  js  c++  java
  • fastreport打印空白行的方法

    FastReport 3.X 


    var 
      PageLine: integer;       //在現在頁列印到第幾行 
      PageMaxRow: integer=15;  //設定每頁列數 

    procedure MasterData1OnBeforePrint(Sender: TfrxComponent); 
    begin 
      PageLine := <line> mod PageMaxRow; 
      if (PageLine = 1) and (<line> > 1) then 
        Engine.newpage; 
    end; 

    //Footer1高度設為0 

    procedure Footer1OnBeforePrint(Sender: TfrxComponent); 
    var 
      i: integer; 
    begin 
      i := iif(PageLine=0, PageMaxRow, PageLine); 
      while i < PageMaxRow do begin 
        i := i + 1; 
        Engine.ShowBand(Child1);  //印空白表格 
      end; 
    end; 

    begin 
    end. 


    FastReport 2.X 

    在資料字典設定變數 
    PageMaxRow 設定每頁列數。 
    PageLine 在現在頁列印到第幾行。 
    每 PageMaxRow 筆新自動跳頁(在Band的OnBeforePrint) 



      PageLine := [line#] mod PageMaxRow; 
      if (PageLine = 1) and ([line#] > 1) then 
        newpage; 


    一頁列印15筆,不足筆數的列印空白表格列的方法 
    Master1 
    detail1----固定印PageMaxRow筆,有表格 
    detailFooter1---在OnBeforePrint輸入下列程式碼,高度設為 0 
    child1---空白表格 

    **detailFooter1.OnBeforePrint 



      i := PageLine; 
      if i = 0 then 
        i := PageMaxRow; 
      while i < PageMaxRow do begin 
        i:=i+1; 
        ShowBand(Child1); 
      end; 

    好的代码像粥一样,都是用时间熬出来的
  • 相关阅读:
    Hash大法
    最小表示法
    KMP算法题集
    分块总结
    2018 雅礼国庆集训
    二分图总结
    贪心总结
    Tire树总结(模板+例题)
    工具类文章合集
    网文胡乱汇总
  • 原文地址:https://www.cnblogs.com/jijm123/p/14918237.html
Copyright © 2011-2022 走看看