//函数定义
Function AdjustAssistContract(txt:TQRDBText;intPos:integer;var Value:string):string;//调整外协合同
//调整外协合同报表显示位置
function TfrmXKReport1.AdjustAssistContract(txt:TQRDBText;intPos:integer;var Value:string):string;
var
strTmp:string;
intTmp:integer;
begin
strTmp:=Trim(value);
intTmp:=Length(strTmp);
if intTmp>intPos then
begin
if ByteType(strTmp,intPos)=mbLeadByte then
Result:=Copy(strTmp,1,intPos-1)+#10#13+Copy(strTmp,intPos,intTmp-intPos+1)
else
Result:=Copy(strTmp,1,intPos)+#10#13+Copy(strTmp,intPos+1,intTmp-intPos);
txt.top:=5;
txt.Height:=28;
if blnDetailAssistContractFlag then
exit;
DetailBand3.Height:=42;
QRShape39.Top:=35;
QRShape26.Height:=65;
QRShape27.Height:=65;
QRShape28.Height:=65;
QRShape29.Height:=65;
QRShape30.Height:=65;
QRShape31.Height:=65;
QRShape32.Height:=65;
QRShape33.Height:=65;
QRShape34.Height:=65;
QRShape35.Height:=65;
QRShape36.Height:=65;
QRShape37.Height:=65;
blnDetailAssistContractFlag:=true;
end
else
begin
Result:=strTmp;
txt.top:=5;
txt.Height:=14;
if blnDetailAssistContractFlag then
exit;
DetailBand3.Height:=24;
QRShape39.Top:=21;
QRShape26.Height:=50;
QRShape27.Height:=50;
QRShape28.Height:=50;
QRShape29.Height:=50;
QRShape30.Height:=50;
QRShape31.Height:=50;
QRShape32.Height:=50;
QRShape33.Height:=50;
QRShape34.Height:=50;
QRShape35.Height:=50;
QRShape36.Height:=50;
QRShape37.Height:=50;
end;
end;
//调用
procedure TfrmXKReport1.QRDBText28Print(sender: TObject;
var Value: String);
begin
value:=AdjustAssistContract(QRDBText28,26,value);
end;