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

Show Page Header if there is no results returned

Status
Not open for further replies.

gk17

Technical User
Sep 6, 2013
86
US
Hi,

I have a Page Header that shows details on what parameters the user entered. Basically I'm using the Page Header for troubleshooting purposes when the report doesn't return any data. It will show what parameters were entered.

I put the following into the Page Header suppress formula but ran into a problem:

Code:
not(onfirstrecord and onlastrecord)

This seems to work fine for all my reports I have been creating except one. It seems to show when there is just ONE (a single) record returned. I don't want it to show if there is any results. I probably never seen this before because I usually have multiple records. I only want that Page Header to show when there are zero records returned.

Why doesn't this work? I have been using this for all my other reports. As I was typing this, I tried using the following and that worked fine for this report:

Code:
count({field}) <> 0

So is the second one a better method to use over the first code I posted?

Thanks.
 
Move your information to the Report Footer, and give it a suppression formula of: recordnumber > 0
 
I don't believe the count of records will never be 0. If the report doesn't return records the count is null.

I suggest using the following to suppress a section only if there are records:

Code:
Not(Isnull(Count({table.field})))

Cheers
Pete
 
Whoops, the 1st sentence should read "I don't believe the count of records will ever be 0" (ie, "ever", not "never")

Pete
 
Thanks for the replies.

Clarify, I had to use the following for the information to show up in my report:

Code:
not(recordnumber > 0)

Pete, that formula worked perfectly also.

I'll keep these handy to see which one works best. It's definitely better than what I was using originally.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top