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!

How to implement "don't print if no data fetched"?

Status
Not open for further replies.

Jcatcat

Technical User
Jul 9, 2007
10
0
0
CN
I have a CR report which will be print daily (schedule daily).

For example:
I want to print new contract every day.

So I create a filter: contract_create_date = TODAY.

But not every day there will be new contract coming in. So when no data fetched, a empty report will be printed. This makes no sense and wastes papers.

How can I say: don't print if no data fetched ?
 
You might want to ask that question in a forum more suited to classic Crystal Reports.

Steve Krandel
Intuit
 
The trick is to make the report fail so a scheduled print job will not even try to print. In a suppressed page footer (or somewhere hidden) produce a field that divides by the number of records retrieved. If there is a ZERO record count, you will be trying to divide by 0 which should result in an error. Run this function 'WhilePrintingRecords;' and this should cause your report to fail and therefore not print.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top