on 04-27-2009 9:08 PM
I have several daily reports that are scheduled to send through Crystal Enterprise on a daily basis. However, I need to suppress the schedule when this report is blank. I know how to do this in the report itself, but I do not know how to keep it from being emailed when the report is blank.
Thank you,
Marlene
CR Professional; Product Type: FULL
Product Version: 11.5.91076
Platform: Windows XP
Edited by: Marlene Human on Apr 27, 2009 10:08 PM
does anyone have an answer here?
How do I prevent a report from being email that contains no data?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think you can create a formula in the report like this
count(field)/count(field)
Now place this formula in the report and suppress it.
When the report has records for example 100 records then this formula will give you the output 100/100=1
When you don't have any records then 0/0=error
Since you are getting an error in the report it won't schedule the report when you don't have any records.
Hope this helps!
Raghavendra.G
I implemented this solution, however in what I would consider to be extremely strange, when this reports run on my desktop, I get a Division By Zero error (great!). When I run this on Crystal Enterprise (yes, old version I known) it seems to ignore that error and delivers an email with a blank spreadsheet attached.
I have found this to be true in my situation as well. And I am also using Crystal Enterprise. I have been given the advice of using a third-party software to schedule reports, however IT tells me that due to security issues, this is not an option.
I can't believe that there is no way to inhibit the emailing of a blank report in the scheduling of the report itself. I can get it to work properly within Crystal Reports but it's in the scheduling piece of it that sends out the email with a blank report.
Any help that can be provided is greatly appreciated. This is an old issue and the users are frustrated that I can't find a resolution for this. They get irate when they open blank reports.
I did it like this
1.Create two formulas
2.Formula1 is called zero and write 0 there
3.Formula2 suppressEmptyReport and write the following code
if isnull(fieldvalue) then (1/{@zero}) else 1
4.Place the formula suppressEmptyReport in the report footer
5.Write the following code in formatting formula Suppress(No-Drill Down) for the report footer section
not (isnull(fieldvalue))
6.Now schedule the report
If the report has records it sends the report
If the report is blank, the report fails to run with division by zero error and it will not send the email with empty attachment.
User | Count |
---|---|
80 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.