I am adding values for each customer by month. When the customer changes, the customer values will be added to report totals and then set to 0. The arrays are defined and initialized in a formula in the report header. I am receiving the error "A currency amount is required here."
I have placed an asterisk where CR is asking for a CurrencyVar. This is my formula code in the details section:
This seems very strange to me. It looks like my code is well-formed and there are no 'open' assignments. I can't think of any reason it would expect a certain type of var immediately after an Else. I placed parenthesis around everything to try to narrow down the root of the error, but it stays elusive.
I have placed an asterisk where CR is asking for a CurrencyVar. This is my formula code in the details section:
Code:
WhilePrintingRecords;
CurrencyVar Array CustTotals;
CurrencyVar Array MonthTotals;
NumberVar Index := Month ({BacklogSumm.DueDate});
If OnFirstRecord Then
(CustTotals[Index] = {BacklogSumm.Price};)
Else (
If {BacklogSumm.CustCode} = Previous({BacklogSumm.CustCode}) Then
(CustTotals[Index] := CustTotals[Index] + {BacklogSumm.Price};)
Else *(
For Index := 1 To 12 Do (
MonthTotals[Index] := MonthTotals[Index] + CustTotals[Index];
CustTotals[Index] := 0;
)
)
)
This seems very strange to me. It looks like my code is well-formed and there are no 'open' assignments. I can't think of any reason it would expect a certain type of var immediately after an Else. I placed parenthesis around everything to try to narrow down the root of the error, but it stays elusive.