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.
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.)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.