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!

Need to display "No records" when there are none 1

Status
Not open for further replies.

src2

Technical User
Mar 1, 2001
72
0
0
US
I run a report everyday and sometimes there are no records because there isn't any that match my criteria. What I would like to do is display the message "no records today" when there are none. I tried a couple of things using suppression but haven't managed to get it to work. Any help would be appreciated.

Thanks!
 
Right click the report header and select insert section below.

In this newsection, place your message for when there are no rows returned.

Then right clickthe section and select format section/section expert and in the X2 next tosuppress place:

isnull({table.field})

For some field that could never be null, such as a key or ID.

-k
 
Sorry to be so long in getting back. I tried what you said but couldn't get it to work. I want the message "no records today" to appear after my column headings where detail lines would normally go if there were records. I tried applying your instructions creating a detail-a and a detail-b. The message "No records today" appears even when there are records. I tried putting the code in the X-2 for suppress blank section and in suppress no drill down (I wasn't sure which one you meant) testing with the box checked and unchecked. Any more ideas?

Thanks
 
Insert another page header section below the one that includes your column headings. Then go to the field explorer->formulas->new and enter:

if isnull({table.field}) then
"No records today"

Make sure that the field you use in the formula is recurring, i.e., that it always is populated when the report returns any records. Place this formula in page header_b. Then go into the section expert->page header_b->check "suppress blank section".

For this to work you must also go to file->report options and make sure that the following is NOT checked: "Suppress Printing if No Records".

-LB
 
That worked! Thanks a lot!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top