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!

Reports scheduling help 1

Status
Not open for further replies.

rock786143

Programmer
Aug 12, 2009
20
IN
We were facing problems of reports running before the data available and reports appearing blank.

Is there not something that we can instrument that tells the reporting engine when to fire and run the reports?

If that is not an option, then what about something in the reports that checks for data and reschedules if there is no data?

Please suggest is there anyway to do it in BOE.

Thanks in advance.
 
We had same issue :
Preventing Blank Reports
Some of our customers do not wish to receive emailed reports that contain no records. Crystal Reports Server does not provide inbuilt functionality to prevent blank reports from being emailed once run as part of a schedule. A solution is to edit the report to count the number of records it has and then use the use the record count as the denominator in a division calculation in a second formula. Below is an example of a formula written in Basic syntax which counts the records in a report. This formula should be placed in a group or details section of the report: Global rowcount as Number if isnull(count({table.field})) then rowcount = 0 else rowcount = count({table.field}) End If Formula = rowcount Below is the second formula which performs the division, this formula must be placed in the report footer section of the report: WhilePrintingRecords Global rowcount as Number Formula = 1/rowcount If there are no records then the second formula will fail as you cannot divide by zero. When the report is now run in a schedule in Crystal Reports Server, if there is no data the report will fail and therefore will not be emailed as there is no data

We had a professional in to help with this - he wrote the above, we were already doing the same though, so it seems there wasn't a cleaner way when we did this in Nov 07.
 
Just found this, whilts looking for something else
- same as above but easier :

- in the File/Report Options, check 'Suppress Printing if no records'
-set 'New Page after' for the report header section
-when schedule the report, on the Format tab, choose to start with page 2

If there are no records, there is no page 2, the report is not e-mailed.
 
Thanks for the info.

See if there is no data i want the report to be rerun after some time automatically and send en email with the rpt attachment.
How do i do this.
 
Depends on how often data in the table being queried updates.
We had same thing, so we set CE to schedule the report every 30 mins. If it found data it would e-mail, but failed if no data & hence no e-mail. If you update the data regularly, but don't want to send data previously sent. e.g. "Items just gone on QC hold", the report select criteria should be the last x hour's records and match that on the schedule. Otherwise, if data sent before OK to be sent again e.g. "Everything on QC hold" then just schedule to send every hour and last report sent will be latest position.

 
You can do this with event-based scheduling with File Events. The concept is that you set up file events to look for a file with a specific name in a specific folder - the file doesn't have to have anything in it, it just has to be there. Whatever software is doing the data loads will create the file when it's finished loading data. BOE will look in the folder every couple of minutes (interval determined by settings on the Event Server) to see if the file is there, when it is, BOE kicks off the event and anything that is scheduled based on that event will run. So, you set your reports to run at a specific time based on an event. The schedules will start looking for the event at the time they're scheduled to run but they won't actually run until the event occurs.

The trick with using this technique is that the file has to be deleted from the folder and it needs to be gone for a period that is longer than the interval the Event server uses to poll the folder for the file. For example, if your event server looks at the folder every 2 minutes, the file must be missing from the folder for at least two minutes. If you're data load is always guaranteed to run longer than the Event Server polling interval, you can delete the file as the first step in the data load and then create it as the last step. If it may run shorter than that, you'll probably want to run a .bat file on a scheduler to clear out the files at a specific time that is earlier than the data load is scheduled to run. (You don't want to have the polling interval to be too small because that puts a heavier load on the report server.)

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.
 
I have an empty Excel file called 'trigger rate reports x.xls' the removing of the x and instantly replacing it is trigger for running reports (set to every 1 second )used when I know the data has been manually changed by me. Note the file name defaults to a file name the trigger ISN'T looking for as this prevents the reports being triggered if the server shuts down for any reason.
 
Thanks All -- appreciated.

But whenever the event files pushed to BO server, all daily reports triggered automaticaly with out waiting for the scheduled time. I surprised with this. Why it's not triggering at the scheduled time with events.
Please suggest steps to troubleshoot.

Thanks.
 
Hi hilfy,

So, you set your reports to run at a specific time based on an event. The schedules will start looking for the event at the time they're scheduled to run but they won't actually run until the event occurs.>>>>
>>>
whenever the event files pushed to BO server, all daily reports triggered automaticaly with out waiting for the scheduled time. Why it's not waiting for the report actual scheduled time.
can you suggest me? how you tested it?

Thanks.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top