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!

"Suppress Printing If No Records" Doesn't

Status
Not open for further replies.

tcorrigan

Programmer
Jun 3, 1999
43
0
0
US
Using CR 8.5 and the RDC I'm printing a report based on data generated by a SQL Server stored procedure. Sometimes there is no data but Crystal still prints a blank page, even tho Suppress Printing If No Records is selected in the report options. Does anybody have any insights as to why this should be or on how to prevent the blank page from coming out?
 
I had a similar prob a few weeks back...try defaulting the suppression.

To do this, you check the suppress button, THEN apply the normal suppression formula.
 
I tried all kinds of things with regards to suppressing sections but that didn't solve anything.
 
Are there no labels or anything, just a blank page?
 
do this:

Insert>Running Total Field. Make it evaluate whatever field is unique on each record, and refresh on whatever group.

Then place this running total field in the section you want suppressed.

Now for the suppression formula, use:
{Runningtotalfield}=0
 
I haven't been able to try yet what you suggest, but I have used a suppression formula like this:

formula = IsNull({Orders.Orderno})

which I believe is functionally equivalent to what you suggest since if there no records the Orderno field should be null.

I think we might be off the track here. The problem is not that a page prints with just the titles and captions printed (the usual sign of a report not having any data) but rather that a (completely) BLANK page comes out of the printer.
 
You can't use this formula. Crystal won't evaluate any formulas (except running totals) if there is no recordset.

formula = IsNull({Orders.Orderno})


Look and see if you are doing a 'New Page After' in any of the sections.

 
Do you have 'New Page Before' set for a Group?

Cheers,
- Ido ixm7@psu.edu
 
To Jazerr: I added the running total field as you suggested but that didn't solve the problem.

To IdoMillet: There is no New Page Before or New Page After specified in any group.

I've also gone through and checked Suppress Blank Section in every section of the report, but that still doesn't solve the problem.

Thanks for your input tho.

Tom
 
If you run your stored procedure indepedent of Crystal, are you getting "(0 row(s) affected)" as the result, or something else like NULL? Brian J. Alves
Email: brian.alves@worldnet.att.net
VB / Crystal / SQLServer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top