Skip to Content
0
May 04, 2015 at 06:24 AM

A String Array is required here.

168 Views

WHILEPRINTINGRECORDS;
LOCAL StringVar Text:="";

Text := replace(replace({DETAILS.INTERVL}, chr(13)," "), chr(10)," "); //Eg: DETAILS.INTERVL data : AAA AAA BBB AAA BBB

Stringvar Array strings := Split(Text, " ");
LOCAL Numbervar i;

LOCAL stringvar array resultsarray;
LOCAL Numbervar x;
for i := 1 to Ubound(strings)
do(
              
 
IF i=1  THEN
   
(
             
resultsarray:= resultsarray + strings[i] ;
   
)
 
Else (
      
             
for x:=1 to Ubound(resultsarray)
       
                   
do(
                    
for j:=1 to Ubound(resultsarray) do(
                 
if resultsarray[j]<>strings[i] THEN
                 
  (
                      
   resultsarray:= resultsarray + strings[i] ;
                   
)
               
  else
                    
resultsarray:= resultsarray;
               
);        
);
join(resultsarray,' ');



getting an error in the else section the error is : A String Array is required here.