morechocolate
Technical User
I need to display, in group footer 1, loans from the detail section. In the detail section I can have more than one loan. Therefore, I set up an array to capture the loans. The problem I am having is that I need to reset the array for each group because without doing so I am going over the number of allowed elements in a array. Feedback is appreciated.
I am using Crystal 8.5
@formula1
BeforeReadingRecords;
global NumberVar x;
global NumberVar y;
global stringVar Array loans;
global numberVar strLen;
@formula2 - in details
WhileReadingRecords;
global NumberVar x;
global NumberVar y;
global stringVar Array arMaster;
global stringVar Array arLoans;
Local StringVar strLoanNum := {P.LOAN};
global numberVar strLen;
if Not (strLoanNum in arMaster) then
(x := x + 1;
Redim Preserve arMaster[x];
strLen := strLen + Length(strLoanNum)+1; //add one to allow for comma separation
select strLen
case 0 to 254:
if Not (strLoanNum in arLoans) then
(y := y + 1;
Redim Preserve arLoans[y];
arLoans[y] := {P.LOAN}
default:
'';
)
@formula3 - in group footer
WhilePrintingRecords;
global stringVar Array arLoans;
Join(arLoans,chr(13))
I am using Crystal 8.5
@formula1
BeforeReadingRecords;
global NumberVar x;
global NumberVar y;
global stringVar Array loans;
global numberVar strLen;
@formula2 - in details
WhileReadingRecords;
global NumberVar x;
global NumberVar y;
global stringVar Array arMaster;
global stringVar Array arLoans;
Local StringVar strLoanNum := {P.LOAN};
global numberVar strLen;
if Not (strLoanNum in arMaster) then
(x := x + 1;
Redim Preserve arMaster[x];
strLen := strLen + Length(strLoanNum)+1; //add one to allow for comma separation
select strLen
case 0 to 254:
if Not (strLoanNum in arLoans) then
(y := y + 1;
Redim Preserve arLoans[y];
arLoans[y] := {P.LOAN}
default:
'';
)
@formula3 - in group footer
WhilePrintingRecords;
global stringVar Array arLoans;
Join(arLoans,chr(13))