Hi !
I don´t know if this is exactly what your are looking for, but here is a way I use to prevent a scheduled report not to run during a given time period:
Create two formulas:
@StopExecute_StartTime
timeVar StopExecute_StartTime := Time(12,00,00);
@StopExecute_StopTime
timeVar StopExecute_StopTime := Time(13,00,00);
Then in the Record Selection you write:
if (CurrentTime >= {@StopExecute_StartTime}) and (CurrentTime <= {@StopExecute_StopTime}) then
false
else
true and
"here you write your normal selection"
I also have a formula placed in the Report Footer where the user gets information why the report not have been executed.
@Annotation
if (CurrentTime >= {@StopExecute_StartTime}) and
(CurrentTime <= {@StopExecute_StopTime}) then
'The report has not been executed because it was scheduled to run outside the allowed time, which is before' + ToText({@StopExecute_StartTime},'HH:mm') +
' or after ' + ToText({@StopExecute_StopTime},'HH:mm') + '.'
else
''
Maybe it can help you.
/Goran