Skip to Content
0

How to display values in an array using Crystal

Oct 21, 2017 at 04:49 PM

33

avatar image
Former Member

I created an array with list of product names. I want to display the list. When the following runs, it simply shows me the last entry in the array, not the list of items in the array. I have this code in the report footer

whileprintingrecords;
Shared stringvar array premium;
numbervar x := 1;
stringvar showit;

for x := 1 to 5 do
(
showit := premium[x];
x := x+1;
);

showit;

If I move the last line to within the () then I get True as the response.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Ido Millet Oct 22, 2017 at 04:59 PM
0
Shared stringvar array premium;
Join(premium, ",");
Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thanks. I did not need all the additional coding for handling the loop. I made an adjustment to your answer and added the line break.

whileprintingrecords;
Shared stringvar array premium;

join(premium, ChrW(13));

0