Greetings,
[Crystal 8.5].
I'm having the problem with the following section of a formula:
------------------------------------------------------------
Local Datevar Dt:= Date({@StartDate})+1;
While Dt<Date({@EndDate})
Do
(
DayCount[DayOfWeek(Dt)]:=DayCount[DayOfWeek(Dt)]+1;
Dt:= Dt+1;
);
------------------------------------------------------------
When refreshing the report i'm retrieving the following statement:
"A loop was evaluated more than the maximum number of times allowed".
This formula works on another report, however both the {@StartDate} and {@EndDate} formulas use different dates on the problematic report. On both of the reports {@StartDate}+1 could be greater than {@EndDate}, yet this hasn't caused a problem on the previous report. The maximum end date is 14/09/2005 (today) so that shouldn't be a problem. I've also attempted to stop the While command if StartDate+1 > EndDate but without success. Any ideas?
NB: This section calculates the number of days of week between Start and End Date, excluding the start and end day.
Thanks
[Crystal 8.5].
I'm having the problem with the following section of a formula:
------------------------------------------------------------
Local Datevar Dt:= Date({@StartDate})+1;
While Dt<Date({@EndDate})
Do
(
DayCount[DayOfWeek(Dt)]:=DayCount[DayOfWeek(Dt)]+1;
Dt:= Dt+1;
);
------------------------------------------------------------
When refreshing the report i'm retrieving the following statement:
"A loop was evaluated more than the maximum number of times allowed".
This formula works on another report, however both the {@StartDate} and {@EndDate} formulas use different dates on the problematic report. On both of the reports {@StartDate}+1 could be greater than {@EndDate}, yet this hasn't caused a problem on the previous report. The maximum end date is 14/09/2005 (today) so that shouldn't be a problem. I've also attempted to stop the While command if StartDate+1 > EndDate but without success. Any ideas?
NB: This section calculates the number of days of week between Start and End Date, excluding the start and end day.
Thanks