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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

schedule if records exists 1

Status
Not open for further replies.

JeroenBoon

Technical User
Aug 15, 2002
106
0
0
NL
Hello,

I have a report that produces a PDF scheduled on a daily bases. But some days there is nothing to report and the PDF is empty. Now I want to schedule the report only when there ara records to report, so the PDF would not be empty.
I think I need to use an event, but how? I would like a query to check first wether or not records exist.

Thanks, Jeroen.
 
Hi,
Not sure, but maybe you could use a subreport to create the PDF and suppress it if no records are returned in the main one..






[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Hi,

I have a similar problem but ended up setting up a formula that returns a message in report footer if a running total count of records is zero for example:

'**** Nothing to report today ****'

At least then you know the report has run every day.

Hwyl,

Vaughan
 
Hi,
You could try using the 'Alerts' feature.
I have created one such report (scheduled through Crystal Enterprise 10). Rather than emailing the PDF file itself, I provide a file link in an email to the users. This way your report runs daily but is only sent out whenever the Alert condition is fulfilled.
1. Create a formula @f1 to detect if records exist( e.g.if not isnull(field name) then TRUE else FALSE)
2. Create an alert in your report based on the above formula(e.g. @f1 = TRUE)
3. Schedule this report as 'Daily' (in Crystal Enterprise)
4. Set the destination to a file path.
5. In the Alert Notification tab, provide a file link to the above.

Hope this helps,
BS.
 
You can extend the same technique described by bsharma <star> to send the pdf as attachment. Just create a file event to look for the first report (only needs to be a small report). and then set your "real" report to be triggered off this file event.

Kingfisher
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top