Function IncStr(str:string;Len2:integer):string; var sOlds :string; stmp:string; stmp2:string; j,i:integer; frmstr:string; begin if str <>'' then begin sOlds:= copy(str,1,Length(str) - Len2); stmp := copy(str,Length(str) - Len2 + 1,Len2); for j:=1 to Length(stmp) do if not (Stmp[j] in ['0'..'9']) then Stmp[j] := '0'; i := strtoint(stmp) +1 ; stmp :=inttostr(i); frmstr := '%0'+inttostr(Len2)+'s'; stmp2 := Format(frmstr,[stmp]); while Pos(' ', stmp2) > 0 do stmp2[Pos(' ', stmp2)] := '0'; result := sOlds+stmp2; end else result :=''; end;
有多少個标签要打印﹐就生成多少個QRlable。
var
sOlds :string;
stmp:string;
stmp2:string;
j,i:integer;
frmstr:string;
begin
if str <>'' then
begin
sOlds:= copy(str,1,Length(str) - Len2);
stmp := copy(str,Length(str) - Len2 + 1,Len2);
for j:=1 to Length(stmp) do
if not (Stmp[j] in ['0'..'9']) then
Stmp[j] := '0';
i := strtoint(stmp) +1 ;
stmp :=inttostr(i);
frmstr := '%0'+inttostr(Len2)+'s';
stmp2 := Format(frmstr,[stmp]);
while Pos(' ', stmp2) > 0 do
stmp2[Pos(' ', stmp2)] := '0'; result := sOlds+stmp2;
end
else
result :='';
end;
产品序列号: 产品序列号: 产品序列号: 产品序列号:
GXMT30620030210 GXMT30620030211 GXMT30620030210 GXMT30620030210
(不得撕毁) (不得撕毁) (不得撕毁) (不得撕毁) ...
.
.
.