procedure TPosPubFactureRep.DetailBand1BeforePrint(Sender: TQRCustomBand;
  var PrintBand: Boolean);
var
    n, total : integer;
    str : String;
begin
    total := 1;
    str := ADOArticle.FieldByName('my_data').AsString;
  Repeat
    n := Pos(#13, str);
    if n>0 then
    begin
        Inc(total);
        Str:=RightStr(str, Length(str)-n-1);
    end;
  until n=0;

    DetailBand1.Height:=total*18;
end;

还有SubDetail的行高:

procedure TFEDAV.QRSubDetail1BeforePrint(Sender: TQRCustomBand;
  var PrintBand: Boolean);
begin
    if ( QRSubDetail1.Expanded > 0) then
      begin
        QrShape18.Size.Height := QRSubDetail1.size.Height + QRSubDetail1.Expanded;
        QrShape19.Size.Height := QRSubDetail1.size.Height + QRSubDetail1.Expanded;
        QrShape20.Size.Height := QRSubDetail1.size.Height + QRSubDetail1.Expanded;
        QrShape21.Size.Height := QRSubDetail1.size.Height + QRSubDetail1.Expanded;
        QrShape22.Size.Height := QRSubDetail1.size.Height + QRSubDetail1.Expanded;
        QrShape23.Size.Height := QRSubDetail1.size.Height + QRSubDetail1.Expanded;
      end;
end;

 

相关文章:

  • 2022-12-23
  • 2021-12-23
  • 2021-11-29
  • 2021-11-29
  • 2022-12-23
  • 2021-09-15
猜你喜欢
  • 2021-06-10
  • 2022-12-23
  • 2022-12-23
  • 2021-12-26
  • 2021-11-04
  • 2022-01-02
  • 2022-12-23
相关资源
相似解决方案