I have the following code in my selection criteria (using CR 10):
Global datetimevar firstDate:= datetime(year(CurrentDateTime), month(CurrentDateTime),1,0,0,0) ;
Global datetimevar lastMonth:= dateadd("m",+0,firstDate);
lastMonth:=dateadd("d",-1, lastMonth);
if {ENG_ORD_MERGE_VW.SHP_DT} = lastMonth
then
Do
lastMonth:=dateadd("d",-1, lastMonth)
While {CTDATE.WRK_DAY} <> 1.00 ;
The report appears to be searching records but then part way through it kicks me out with this error message:
"A loop was evaluated more than the maximum number of times allowed"
What is the maximum number of times a loop can be evaluated? I didn't think there was a limit. Does anyone know how I can write this so that it won't kick me out?You need to increase or decrese {CTDATE.WRK_DAY} in the loop
Otherwise it will result in infinite loop|||I can't increment the WorkDay because all workdays need to equal 1, will it work if I put in a dummy counter, just to increment 1?
No comments:
Post a Comment