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

Error message if no records found

Status
Not open for further replies.

crimsntyd

Programmer
Sep 27, 2005
55
US
Hi,
I'd like to know how to display a message (either using VB or code inside the CR) telling the user that no records matched their parameter criteria when the report is finished searching and displaying. I've used the printingstatus.numberofrecordread function, but it only works when there are actually no records at all in the database for the parameter. I need something for when there are records in the database, but (for example) not in the date range specified. Any ideas?
 
You could create a formula in CR that you place in the report header:

if isnull({table.ID}) then
"No records matched your parameter selection."

You must choose a recurring field--one that would appear in each record of the report.

-LB
 
I might try that. I also found that printingstatus.numberofrecordselected works well, too. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top