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!

Exporting to PDF when report has no records

Status
Not open for further replies.

oneilltnc

Programmer
Feb 4, 2003
39
0
0
US
We have a VB program that automatically goes through and emails reports to clients in PDF format. I am having a problem when a report does not have any records, the report still gets emailed to the client...it's just a blank PDF document when they open it up.

I am wondering if there is a way to keep the report from getting emailed if there are no records in the report. I have tried the suppress printing if no records option, but that does not work. I am using Crystal Reports 9 and I need to try and do this within Crystal itself if possible. Thanks for the help.
 
If you are using dataset as a datasource then before exporting the report to PDF check whether there is any reocrd in the table if yes then export otherwiss don't export. It works fine for me.
 
I have a report that assembles details for an account, including subreports that show transaction records that are not always there. So I use the suppress function on section formatting, testing a data field
not isnull ({my.field})
The section says 'No details found' or something similar.

Try doing something similar on your report. The fact that there is nothing to report may be a significant detail, and should be distinguished from a blank which could mean anuthing.

Madawc Williams
East Anglia, Great Britain
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top