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!

Crystal Reports-Send files to users if Data Available else send NO DATA Msg in Email Automatically

Status
Not open for further replies.

madhoo13

Technical User
Jul 5, 2013
4
US
Hi All,

Most of the times users get abc.xls or abc.pdf even when there is no data, the users doesn't like the blank reports.
For which we have implemented NO DATA option however we want to see if we can schedule report to send to the users
only when data is returned without even sending NO DATA Message in email, Is it possible to do so; If so can someone
help me. I have been trying event option but I guess I am not getting the correct syntax or approach to put in filters
or something... Any help is appreciated.

Thanks
 
It is not clear what tool you are using to email the reports. In any case, at least one of the 3rd-party desktop Crystal Reports schedulers listed at provides a simple option to skip processing if the report has no records selected.

hth,
- Ido

view, export, burst, email, and schedule Crystal Reports.
 


Hi,

I am sorry for not being specific, we are using Crystal Reports 2008(no BO universe or Crystal Reports Repository). Writing sql queries directly in DB Expert and scheduling the report(.rpt file) to deliver to users email inbox.

Thanks
 

Sorry, I am not sure if I am missing something but We have BO XI 3.0 (Enterprise software full version), of which we have installed CR 2008, with which it has Crystal Reports Viewer, Report Application Server, Crystal Reports Processing Server, Job Server, CMS/CMC etc. But I am thinking this tool would be the one Crystal Reports schedulers/Email (Desktop) which we are using through Crystal Command(write sql using DB Expert) - Run reports from the command line, create commands and schedule them. Please let me know the way to find out what you are looking for so that I can let you know.( We didn't install anything separately that's why I think to me it looks like CR 2008 although it has downloaded internal components...). Please
enlighten me with your valuable knowledge to achieve my goal.
 
This solution was offered in CE forum:
-set the report to 'Suppress printing if no records'
-set 'new page after' for the report header section
-when schedule the report, on the format page, send starting with page 2
An empty report will fail (as there is no page 2), so nothing is sent to the e-mail
You will need to re-number the pages on the report, as page 1 will be empty, so first page will print page 2

Dana
 

Hi IdoMillet,

Thanks for all your valuable suggestions and solutions.

Hi Ianoctdec,

This solution would fail if data is only limited to one page(definitely there will be no subsequent pages) in this case it would treat as no data and am not sure how would this affect but will try and see. I have another solution kind of working which is divide by zero logic which I found in CE forum.
 
If I were doing it, I'd have a special section saying "*** No Suitable Data for DD/MMM/YYYY ***", supressed when there was data. This could be done using a count, or be testing for Null on a field that could never be null in real data. Then send them that.

The advantage is that they know about the absense of data, rather than having to wonder if there was a delay, omission or message failure.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP [yinyang]
 
If the report has just one page, there will be two pages, it will send the one page report. The solution work always.

Dana
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top