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

Don't print the report if no data is request in the Stored procedure

Status
Not open for further replies.

RSX02

Programmer
May 15, 2003
467
CA
Hi

I have a report that sometime might be empty. What I would like is to be able to don't print this report when the data is empty. My data come from a Stored Procedure.

I have no idea if I have to do that in Crystal Report or in my Stored procedure in SQL. I posted it here but if you think it's in SQL forum that I have to post it tell me I'll post it in the good forum.

Thanks in advance
 
I don't think you can ever suppress printing completely. But in Crystal 8.5, you can right-click on a section, select [Format Section] and then set a formula for [Suppress]. What I do is have a special section that says that no data was found (which confirms that this is the reason for a blank report, rather than some other problem.)

You need to do isnull({your.field}) or not isnull({your.field}) checks.

Madawc Williams
East Anglia, Great Britain
 
hi

you can do it in your report
just format the sections
suppress -> x2
if
isnull({your field})

cheers
pgtek
 
if I understand I have no way to don't even print the blank page?
 
What are you using for scheduling the report?

There are several 3rd party software tools for scheduling Crystal Reports. See List at:
My "Visual CUT" software allows you to schedule reports to be printed, exported, and/or e-mailed. A simple option allows you to specify if processing of reports that find zero records should be aborted or forced.

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top