Joined: 06 Aug 2014
Online Status: Offline
Posts: 8
Topic: How to reset array to start fresh for each group Posted: 08 Jul 2015 at 4:42am
Hi
I have data grouped by client type. I have crated an array to gather the countries represented by each client in the group but I am having problems resetting the array to start for the next group.
Formula 1. in the details section
Whileprintingrecords;
Stringvar array dep;
numbervar i;
if not ({info_countriesFrom.country_name} in dep) then
(
i:= i+1;
redim preserve dep;
dep:= {i.country_name};
);
dep
Formula 2. In group footer
Whileprintingrecords;
Stringvar array dep;
Stringvar fin;
Numbervar j;
For j:= 1 to ubound(dep) do
fin:=fin + dep[j] + ",";
left(fin, len(fin)+2);
How do I reset the array 'dep' to start again for the next group?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum