写代码实现 如: procedure TfrmOAFWSongShenrpt.QRDBText1Print(sender: TObject; var Value: String); var str,str1 : string; strA: PChar; charA: char; Num: Integer; num1:Integer; begin Num := 0; Num1 := 0; str1 := ''; str := Value; strA := PChar(str); while (Num<Length(Str)) do begin charA:=StrA[Num]; if ((CharA=#13) or (CharA=#10)) then begin inc(Num); Num1 := 0; str1 := str1+CharA; end else if CharA>Chr(128) then begin str1 := str1+CharA; str1 := str1+StrA[Num+1]; Num := Num+2; Num1 := Num1+2; end else begin Num := Num+1; Num1 := Num1+1; str1 := str1+CharA; end; if Num1>=62 then begin str1 := str1+#13+#10; Num1 := 0; end; end; Value := str1; end;
如:
procedure TfrmOAFWSongShenrpt.QRDBText1Print(sender: TObject;
var Value: String);
var
str,str1 : string;
strA: PChar;
charA: char;
Num: Integer;
num1:Integer;
begin
Num := 0;
Num1 := 0;
str1 := '';
str := Value;
strA := PChar(str);
while (Num<Length(Str)) do
begin
charA:=StrA[Num];
if ((CharA=#13) or (CharA=#10)) then
begin
inc(Num);
Num1 := 0;
str1 := str1+CharA;
end
else if CharA>Chr(128) then
begin
str1 := str1+CharA;
str1 := str1+StrA[Num+1];
Num := Num+2;
Num1 := Num1+2;
end
else
begin
Num := Num+1;
Num1 := Num1+1;
str1 := str1+CharA;
end;
if Num1>=62 then
begin
str1 := str1+#13+#10;
Num1 := 0;
end;
end;
Value := str1;
end;