I have two formulas
@formula1 - placed and suppressed in details section
WhileReadingRecords;
stringvar array a;
numbervar i;
if length ({trips.SUP_SAME_PICK_DROP}) > 0 then (
i := i + 1;
redim preserve a[i];
a[i] := {trips.SUP_SAME_PICK_DROP};
);
a[i]
this formula simply adds {trips.SUP_SAME_PICK_DROP} value into array.
@formula2
WhilePrintingRecords;
stringvar array a;
stringvar sh;
numbervar r;
for r := 2 to ubound(a) do (
sh := a[r];
);
sh;
i want it to show value of r element of the array starting from second details row, while printing records. Like, if i am printing second row of the report, i want @formula2 to show second element from the array, that is filled in @formula1. If i am printing 10th row, i want @formula2 to show 10th element from the array, that is filled in @formula1.
Now @formula2 shows only last element of the array, when placed in details section. How to achieve my goal?
...sh := a[12];...or...sh := a[3];...This means, array itself gets filled correctly. - user2858200