How do I reset a string array variable

时间:2019-01-09 22:28:21

标签: crystal-reports

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 个答案:

答案 0 :(得分:0)

创建一个新公式,将以下代码放入其中,称其为reset或类似内容,并将其放入组标题中。

StringVar Array arr1;
Redim arr1[0];

但是,您必须将所有输出放在组页脚中,以便在新组开始时重置所有数据。

答案 1 :(得分:0)

有人建议我尝试:

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

它奏效了