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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Schedule Report to run only if there is data

Status
Not open for further replies.

linzorq

MIS
May 19, 2006
3
US
I am working with Crystal Reports XI and Crystal Reports Server 2008. I have an event day report that currently has a prompt for event date. I'd like to schedule this report to run only if there is an event on that date or if the report returns data.

I'd also like to schedule the report to run based on the time of the event, i.e. if the event is at 1PM then run at 12PM and if the event is at 7 PM then 3 PM.

Is this possible in the central management console?
 
This is not possible working strictly with the CMC. However, you might be able to do it with the combination of a custom database job or program.

Basically, you need a job that will check to see whether there is data for the report and create an empty file if the data exists. You would then create a file-based event in the CMC that would look for that file and schedule based on that event. Use this event and a specific time to schedule the report - the report will run at the time that you want only if the file appears.

Part of the trick here is that BO's file-based events look for the presence of the file after it has been absent for at least one cycle of the Event Server. So, you'll also need to set something up to delete the file after each report run. This can easily be done with a .bat file to delete the file - use the Windows Schedule to schedule the run of the .bat file.

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top