I've got the problem about crystal report. I've created one formula field called PAT_DEP and formula is as follow.
Local NUMBERVAR PAT_DEP_AMT := 0;
IF NextIsNull({MYOBJ.PAT_DEPOSIT}) = TRUE THEN
(
IF {MYOBJ.PAT_DEPOSIT} = PREVIOUS({MYOBJ.PAT_DEPOSIT}) THEN
(
PAT_DEP_AMT := 0;
)
ELSE
(
PAT_DEP_AMT := {MYOBJ.PAT_DEPOSIT};
);
)
ELSE
(
IF PREVIOUS({MYOBJ.PAT_DEPOSIT}) = NEXT({MYOBJ.PAT_DEPOSIT}) THEN
(
PAT_DEP_AMT := ToNumber(0);
)
ELSE
(
PAT_DEP_AMT := {MYOBJ.PAT_DEPOSIT};
);
)
Then I've created another formula field called TOT_PAT_DEP and formula is as follow like summarized above formula field.
TOTAL_PAT_DEP := SUM(@PAT_DEP)
But got crystal report error This field cannot be summarized crystal report error. Please help me how come I got this error.