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

Suppress Page Header and Footer if nothing to print

Status
Not open for further replies.

krist

Programmer
May 30, 2001
114
ID
Hi,

I have a question :
I have designed a report, use a selection formula based on passed parameters.
The problem is even if no records meet the selection criteria, the page header and page footer STILL PRINTS, with empty detail.
How to suppress it in this condition ?

Thanks in advance,
Krist

 
Take any required field and use it in a formula like this one, place this code in the suppress condition of the section:

IsNull ({Customer.Region}) Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Thanks Ken,

One more thing, it still prints one blank page.
How to prevent this ?
(So that it doesn't print anything if no records meet the condition)

Thanks,
Krist
 
If you have suppressed every section using that formula, and it still kicks out a page, I am not sure where else to send you. Someone else may know the answer to that one. Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
It depends on how you are using/creating the report. As a VBer, I use the NoData() event in Visual Basic code and with that, I tell the user that "there is no data to print..." I then handle it accordingly (I cancel the event by setting Cancel = True and nothing prints).
=^..^=
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top