i am trying to get all the codevalues separated by commas in a variable x but while doing this getting some duplicates or some values are missing.
WhilePrintingRecords;
stringVar x;
if length(x) = 0 then
x := x + {CODEVALUE.DESCR}
// else
// x := x + ", " +{CODEVALUE.DESCR};
else if
(
stringvar array Rev_Array := x;
stringvar array Rev_Array_Final;
stringvar Rev_Codes;
numbervar Counter;
numbervar i;
for counter := 1 to ubound(Rev_Array) Do (
if NOT (Rev_Array[counter] in Rev_Array_Final) then (
redim preserve Rev_Array_Final [ubound(Rev_Array_Final)+1];
i := i + 1;
Rev_Array_Final := Rev_Array[counter];
Rev_Codes:=JOIN(Rev_Array_Final,",");
))) then
Rev_Codes
WhilePrintingRecords;
stringVar x;
if length(x) = 0 then
x := x + {CODEVALUE.DESCR}
// else
// x := x + ", " +{CODEVALUE.DESCR};
else if
(
stringvar array Rev_Array := x;
stringvar array Rev_Array_Final;
stringvar Rev_Codes;
numbervar Counter;
numbervar i;
for counter := 1 to ubound(Rev_Array) Do (
if NOT (Rev_Array[counter] in Rev_Array_Final) then (
redim preserve Rev_Array_Final [ubound(Rev_Array_Final)+1];
i := i + 1;
Rev_Array_Final := Rev_Array[counter];
Rev_Codes:=JOIN(Rev_Array_Final,",");
))) then
Rev_Codes