Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Limiting the window for Scheduling reports 8

Status
Not open for further replies.

rictorsan

Technical User
Sep 6, 2002
25
US
Does anyone know of an existing method to limit users to scheduling reports within a given time window. E.g., I know that users cannot schedule reports from 12 noon to 1, or I know that they CAN schedule them from 12:00am-6:00am. Is there anyway to automatically enforce this or would it need to be custom ePortfolio code ?

Thanks,

rictorsan
 
Did you ever find an answer to this question? I was curious about the same thing.

Thanks!
 
You'd need custom code for this, there is no such functionality out of the box. Maybe a company like APOS has a solution, I don't know.

Kingfisher
 
You might be able to make something work with a file-based Event, but I don't think it would be pretty.
 
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
 
That's cool.

You could extend the logic further in CE10 to trigger an Alert and email the alert to User / Admin.

The only "problem" is that as far as CE is concerned the report was scheduled - the request was to prevent scheduling - otherwise I would have come up with that idea myself...honest ;-)

Kingfisher
 
Would the solution goranm presented work for limited the window in which they CANNOT run reports to a specific date AND time? We don't want our users running reports within the first 10 days of each month because we're reconcilition numbers and reports.

jennifer.giemza@uwmf.wisc.edu
 
I'm guessing that you would add a @StopExecute_StartDate and @StopExecute_StopDate to take care of your dates.

((CurrentTime >= {@StopExecute_StartTime}) and CurrentDate >=(@StopExecute_StartDate)) and (CurrentDate <= {@StopExecute_StopTime}) and (CurrentTime <= {@StopExecute_StopTime})


-or-

create a function that determines what day of the month it is and (CurrentTime >= {@StopExecute_StartTime}) and (CurrentTime <= {@StopExecute_StopTime}) and Day(currentdate) <= [@YourDayofMonthFunction]


Hope this helps?
 
You might change the methodology if that's the case to something like:

Record selection
if day(Currentdate) > 11 then
{table.field} = {?dateparm}
else
1 = 0

Report footer formula:
if day(Currentdate) < 11 then
"The report has not been executed because it was scheduled to run before the 10th"

-k
 
In CE10, you could create a batch file as a program object. At the correct time, the batch file would just stop the ReportJobServer using net stop.
Another batch file could start using net start.
You'd just need to ensure you turned on a sensible number of retries or the reports would all fail rather than running when the server starts again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top