Hey everyone i got a small problem on my hand. I'm doing multiple report that use all the same formula and they all work, but one and i don't know why. Let me explain I use this formula in 4 reports and it worked perfectly but when i try to use it in fifth one it always say field no know error in file.
Here is my code for the formula:

Shared numberVar z;
Shared StringVar array CodeDesc;
Shared StringVar array CodeCont;
numberVar Verification := DistinctCount(CodeDesc)-1;
StringVar EstDejaLa := "1";
numberVar y := 1;
CodeDesc[1];
For y := 1 To Verification do
(
if(CodeDesc[y] = {ReportReception.cntDescription}) then
(
if(CodeCont[y] = {ReportReception.cntCode}) then
(
EstDejaLa := "0";
)
)
);

if(StrCmp(EstDejaLa,"1") = 0) then
(

CodeDesc [z] := {ReportReception.cntDescription};
Redim preserve CodeDesc[UBound(CodeDesc)+1];
z := z+1;
CodeDesc[z-1];

)

So someone did someone got the same problem as mine?