首页 > 代码库 > QuickReport根据每行的内容长度动态调整DetailBand1的行高
QuickReport根据每行的内容长度动态调整DetailBand1的行高
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;
QuickReport根据每行的内容长度动态调整DetailBand1的行高
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。