I want to report the results of an array as a string in the group footer, in the format "ArrayItem1, ArrayItem2, ArrayItem3 etc"
The formula (called @Array)I am using to output the array is the following:
which I put into the (suppressed) details section. I then try to output the array results as a string, using 2 formulae:
Formulae 1 (placed in the suppressed details section:
This is then displayed by Formulae 2 in the group footer section:
The kind of output I am getting is:
ArrayItem1,,,,,,ArrayItem2,,,,,
or ArrayItem1,,,,,
Any help?
Thanks, Rob
The formula (called @Array)I am using to output the array is the following:
Code:
whileprintingrecords;
stringVar array MyArray;
numberVar Counter;
if onfirstrecord or {Owner_details.Owner ID} <>
previous({Owner_details.Owner ID}) then
(redim MyArray[1];
Counter := 0);
if not ({Imported_Animals.SPECIES} in MyArray) then
(Counter := Counter + 1;
if counter <=1000
then (Redim Preserve MyArray[Counter];
MyArray[Counter] := {Imported_Animals.SPECIES}));
which I put into the (suppressed) details section. I then try to output the array results as a string, using 2 formulae:
Formulae 1 (placed in the suppressed details section:
Code:
StringVar list;
If list="" then
list := {@Array}
else If Length(list) <= 1000 then
list := list + ", " + {@Array}
This is then displayed by Formulae 2 in the group footer section:
Code:
WhilePrintingRecords ;
stringVar list;
stringVar lastList;
lastList := list;
list := "";
lastList
The kind of output I am getting is:
ArrayItem1,,,,,,ArrayItem2,,,,,
or ArrayItem1,,,,,
Any help?
Thanks, Rob