How do I reset a string array variable

Viewed 520

I have a report with 4 different arrays.

All are set up like this

shared stringvar array arr1 := split({client_relations.sales_value}, "&");
'';

I need them to reset for each group. How do I do that? I tried something like this

WhilePrintingRecords;
shared stringvar array arr1 := " "; 

But I got an error saying the formula could not create an array.

2 Answers

Someone suggested to me I try:

WhilePrintingRecords;
shared stringvar array arr1 := "";
'';

And it worked

Create a new formula putting the below code in, calling it reset or something along those lines and place it in the group header.

StringVar Array arr1;
Redim arr1[0];

However, you will have to put any outputs in the group footer for this to work as it resets all data at the start of a new group.

Related