Hi
Crystal 9.0 with access database
I have a report which takes referrals for patients. From these referrals i want to be able to count the records that are referred on to other departments and those that haven't.
I have a two formulas set up
@Inc which checks the record to see if it has been referred on and assigns the value 1 if so and 0 if not.
@IncTotal which sums up the @inc formula.
The problem i have is that if the last record shown in the details is one which recieves a 1 from the @Inc formula then the final @IncTotal sums up to one more than it should.
The same happens when i count those records that aren't referred on, if the last record isn't referred on then the count is 1 greater than it should be.
{@inc}
global numbervar counter;
whileprintingrecords;
if not isnull({1_ALL_REFERRALS.OTHER_AGENCIES_REFERRAL})
then
counter:=counter+1;
{@IncTotal}
global numbervar counter;
evaluateafter({@inc});
counter;
If anyone has any ideas what may be causing this i'd appreciate the help.
Thanks in advance
Crystal 9.0 with access database
I have a report which takes referrals for patients. From these referrals i want to be able to count the records that are referred on to other departments and those that haven't.
I have a two formulas set up
@Inc which checks the record to see if it has been referred on and assigns the value 1 if so and 0 if not.
@IncTotal which sums up the @inc formula.
The problem i have is that if the last record shown in the details is one which recieves a 1 from the @Inc formula then the final @IncTotal sums up to one more than it should.
The same happens when i count those records that aren't referred on, if the last record isn't referred on then the count is 1 greater than it should be.
{@inc}
global numbervar counter;
whileprintingrecords;
if not isnull({1_ALL_REFERRALS.OTHER_AGENCIES_REFERRAL})
then
counter:=counter+1;
{@IncTotal}
global numbervar counter;
evaluateafter({@inc});
counter;
If anyone has any ideas what may be causing this i'd appreciate the help.
Thanks in advance