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!

CE Email Option

Status
Not open for further replies.

Jhankins

Programmer
Jun 17, 2003
46
AU
I generate reports which email once a day. Sometime the reports return no data so I dont want it to email a blank report. Is there away to stop it based on returning no records??


 
I've been looking for ways to track the failure of things to run correctly, get data, etc., but haven't had a lot of luck yet.

What we've done is set up trigger Events for some of our reports. Our database server FTPs over a file with the date in it to the Crystal Enterprise server. The reports are then scheduled to run with Events and look for the file from the database server as the indication to run.

In your scenario, you could have your DB system send a file over to your Crystal server if there is data available to that report.
 
Datamuse,
I don't that he was referring to his reports erroring, I have the same problem. The report runs on a daily basis, but some days there might not be any data to generate returning 0 records. I think that we are trying to keep the email from sending out if there were 0 records returned.

-- PALMBAK

Jon Palmbak
Business Analyst
 
With previous versions you could force the report to fail with a Division by Zero error. Unfortunately, this doesn't seem to work any more (I couldn't get it to work in 8.5 - it causes the report to fail whether there are records or not).

Instead of emailing a blank report, place a conditionally suppressed text message in the report. The message could state something like 'No records generated on <CurrentDate> where Selection Critieria = <insert here>' when the Count({table.field}) = 0. The report will still be emailed, but it could have an intelligent, customized message.

Most times when an end user gets a blank report, they assume its broken. By providing them with the information, they can be assured that the report worked correctly, it just didn't return any data.

For my current project, I require my team to insert a customized 'No Records' in every report. Since we have to archive all report output anyway, this solution works well.
 
That is actually a pretty good idea. However, it would be nice if you were able to put the conditional in the subject line of the email.
(Guess we will have to wait for that one.)

Jon Palmbak
Business Analyst
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top