Hello All, I have a report in which I have to formulas. One formula is within the details section:
Global DateVar array Names;
WhileReadingRecords;
Redim Preserve Names[UBound(Names) + 1];
Names[UBound(Names)] := Date({Timeline.TransitionDate});
and it just adds a date value to the array for each item in each group.
My second formula is placed in the group footer:
Global DateVar array Names;
NumberVar array buffer;
NumberVar temp;
NumberVar i := 1;
NumberVar k := 1;
NumberVar j := 1;
NumberVar p := 1;
for i := 1 to UBound (Names) step 1 do
(
Redim Preserve buffer[UBound(buffer) + 1];
buffer[UBound(buffer)] = (DateDiff ("s",DateTime(Names) , CurrentDate ));
);
Everytime I attempt to display this report I am given an array that a subscript must be between 1 and the size of the array. The line in the group footer formula that accesses the Names array is causing the problem. For some reason I do not think the Names array is getting values added to it in the details section or the Names array is not getting properly shared between the formulas. Any help or ideas would be great, I am at a loss to solve the problem.
Frank
Global DateVar array Names;
WhileReadingRecords;
Redim Preserve Names[UBound(Names) + 1];
Names[UBound(Names)] := Date({Timeline.TransitionDate});
and it just adds a date value to the array for each item in each group.
My second formula is placed in the group footer:
Global DateVar array Names;
NumberVar array buffer;
NumberVar temp;
NumberVar i := 1;
NumberVar k := 1;
NumberVar j := 1;
NumberVar p := 1;
for i := 1 to UBound (Names) step 1 do
(
Redim Preserve buffer[UBound(buffer) + 1];
buffer[UBound(buffer)] = (DateDiff ("s",DateTime(Names) , CurrentDate ));
);
Everytime I attempt to display this report I am given an array that a subscript must be between 1 and the size of the array. The line in the group footer formula that accesses the Names array is causing the problem. For some reason I do not think the Names array is getting values added to it in the details section or the Names array is not getting properly shared between the formulas. Any help or ideas would be great, I am at a loss to solve the problem.
Frank