The number of copies of the string is too large or not an in

Below is the code i used for “display String” in CR 2008. When i tried to preview the data i got the following error “The number of copies of the string is too large or not an integer

This is the code i used:

[b]whileprintingrecords;
shared numbervar Max_Integer_Length;
local stringvar out_put;
local numbervar j;
local numbervar intr := 40;

if instr(Currentfieldvalue,".") > 0 then
(
local stringvar array field := split(Currentfieldvalue,".");
local numbervar i := intr - len(field[1])+1;
out_put := space(2*i) + currentfieldvalue

)

else if not numerictext(currentfieldvalue) then
(
j := (12 - len(field[1]))\2;
out_put := space(2*j) + currentfieldvalue
)

else if instr(Currentfieldvalue,".") <= 0 then
(
local numbervar k := (intr - len(currentfieldvalue))+1;
if left(currentfieldvalue,1) in ["-","<",">"] then
out_put := space(2k) + currentfieldvalue
else
out_put := space(2
k) + currentfieldvalue
)[/b]

Please help me resolve the issue.

Thanks
Mallikarjun


mallikarjun1017 (BOB member since 2011-08-25)