Experts:
I'm having a problem with a variable not accumulating correctly.
This is in GROUP HEADER:
//GF1
whileprintingrecords;
global numbervar APPROVEDACTAMT1:=0;
This is in DETAILS SECTION:
//ACCUMULATION FORMULA
whileprintingrecords;
global numbervar APPROVEDACTAMT1:=
IF({@Installment})="Activation" then
IF({@DisplayAttempts}) = '1' THEN
if({tblPaymentTransactionResult.resultCode})= '1'
then {tblPaymentTransaction.amt}+ APPROVEDACTAMT1
ELSE 0;
This is the display formula in GROUP FOOTER:
//GF1
whileprintingrecords;
global numbervar APPROVEDACTAMT1;
I think the problem may related to this formula that is a part of the ACCUMULATION formula that is in the DETAILS SECTION:
//@DisplayAttempts
whileprintingrecords;
Global numberVar intAttempts;
If OnFirstRecord OR {@Installment}
<> Previous({@Installment}) then
intAttempts := 1
else
If OnFirstRecord OR {Order_Details.OrderID}
<> Previous({Order_Details.OrderID}) then
intAttempts := 1
else
intAttempts := intAttempts + 1;
If intAttempts >= 3 then
"3"
else
CStr(intAttempts,0);
OR ....IT could be an issue with the formula that I'm using to GROUP ON:
(incidentally, I cannot use WHILEPRINTINGRECORDS as I get an error
group chosen on a NON-RECURRING field)
//Frequency
//whileprintingrecords;
if ubound(split({tblProducts.ProductName},"-")) < 3
then "N/A"
else
if split({tblProducts.ProductName},"-")[3] = 'BW' then 'BW'
else if split({tblProducts.ProductName},"-")[3] = 'E2W' then 'BW'
else
if split({tblProducts.ProductName},"-")[2] = 'BW' then 'BW'
else if split({tblProducts.ProductName},"-")[2] = 'E2W' then 'BW'
else
if left({tblProducts.ProductName},3)='18M'
then split({tblProducts.ProductName},"-")[4]
else
if left({tblProducts.ProductName},3)='MPD'
then split({tblProducts.ProductName},"-")[2]
else
if left({tblProducts.ProductName},3)='DLU'
then split({tblProducts.ProductName},"-")[2]
else
split({tblProducts.ProductName},"-")[3]
I realize that this is not alot to go on...but let me know if you have questions......ANY AND ALL advice on WHY my ACCUMULATION FORMULA is not working would be much appreciated. The formula DOES start to accumulate, but It appears to reset itself to ZERO for no apparent reason.
Thanks
MikeV
All we need to know now is what the problem is (:-)