I have a database that has over 1000 products in it. In this database
there's a field called TSICOD that can either be Yes or No. There are
15 products in this database that have yes in this field. The rest are
no. I an trying to load these 15 item numbers into an array in Crystal
Reports. I created the array, but when I go to run the report I get
the error: "A loop was evaluated more than the maximum number of times
allowed." My variable is p and for some reason it is going up to
100001, but it is staying on the same database record (the first
record). Can anyone help me with this?
Thanks in advance.
Code:
global StringVar Array ProArray;
numbervar p=0;
do
(If Next({ITMMASTER.TSICOD_2}) = "YES" Then
ProArray
:={ITMMASTER.ITMREF_0};
p:=p+1;)
while (not nextisnull({ITMMASTER.ITMREF_0}));