Are you trying to print a blank page in the middle of the report?
Do you have the KEEP TOGETHER set so you get blank pages in a report?
mlmcc
Main Topics
Browse All TopicsCan someone help me with a formula for a report that will suppress the page header if there are no details on the page(or second page). Thanks.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
If the report is actually reading no records at all (eg. the record selection is filtering everything out), then, somewhat to my surprise, I found that a formula like the following can be used to suppress the page header section (as well as the detail, report header, report footer or page footer).
IsNull (Count ({table.field}))
I tried checking the Count when no records were read, but instead of 0, as you might expect, the field was "blank". So I tried the IsNull test and, to my surprise, it actually worked. :-)
James
Yes, but it only works if for my specific situations where no details show up on the page(i.e. last record was at the bottom of the previous page). If the last record prints on the next page, it suppresses the page header. Which isn't what I want. I still want the header to show up if there are any details printed.
Got it!
Set up two formulas:
1st one called count, set up like this:
WhilePrintingRecords;
if not isnull(whatever field you want) then numberVar x:= x+1;
2nd one called reset, set up like this:
whileprintingrecords;
numbervar x:=0
and, finally, go into the Section Expert for the Page Header, click off Surpress, click the formula button, and put this in:
{@count} = 0
This works, I tested it!
You put the 'reset' formula, with this code:
whileprintingrecords;
numbervar x:=0
in the page footer?
If that's the case, then it's not getting to run that code before it runs another page... which doesn't make sense.
Try putting the 'count' variable in your details line temporarily , so you can see what it's counting. You may also want to put it in your header as well, again so you can see the count.
What's the last section you see on a "page" when it runs?
Do you want the first page to show, but not the second? Are there records on the first page, but not the second?
You may need to move the 'reset' formula to another section, one that Crystal will come across BEFORE that second page prints.
What's the LAST section that shows on the first page of the report? You'll see it in the tan area to the left of the actual data... it'll say something like GH1, D, GF1, something like that.
Business Accounts
Answer for Membership
by: James0628Posted on 2009-07-17 at 20:04:22ID: 24884609
Do you mean that there are no records at all, or do you, for example, have certain records that are shown on certain pages and you're trying to suppress the page header on specific pages if there are no records for those pages (but there could be records for other pages)?
James