放一個TQRGroupBand,一個TQRBand(Bandtype:Detail);
一般在同一頁中GroupBand只印一次﹐加上n行Detail.如何在同一頁中印(GroupBand 1 行+detail k 行)*2次,且detail 按正常次序 ?
 ________________________________
|         GroupBand             |
|===============================|
|         Detail1               |
|===============================|
|         Detail2               |
|===============================|
|         Detail3               |
|===============================|
|         Detail4               |
|_______________________________|
 ________________________________
|         GroupBand             |
|===============================|
|         Detail5               |
|===============================|
|         Detail6               |
|===============================|
|         Detail7               |
|===============================|
|         Detail8               |
|_______________________________|

解决方案 »

  1.   

    對﹐Groupheader印2次,內容相同。且detail行數每塊4行.
    說白了﹐每頁印2張單據,單據格式固定detail4行。
      

  2.   

    同一頁GroupBand的header印2次?
      

  3.   

    可以通過繼承TQRGroupBand的基類TQRCustomBand訪問未公開的方法Print;
    在QRReport所在的Form的type 部分加入一個"虛"的繼承:
    Type
      TMyQRBand=Class(TQRCustomBand);//"虛"的繼承  TForm1=Class(TFrom)
        ...
      private
        detailLine:integer;
      end;
    然后在QRGroupBand1.OnBeforePrint:
      begin
        detailLine:=0; 
      end;
    在QRDetailBand1.OnBeforePrint:
      begin
        inc(detailLine);
        if detailLine=5 then
        begin
          TMyQRBand(QRGroupBand1).Print;//﹗﹗﹗
        end; 
      end;
    你可以按需要控制打印時機。