Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RECCOUNT()
Message
 
To
19/04/2001 12:36:51
David Brunelle
Université de Sherbrooke
Sherbrooke, Quebec, Canada
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Miscellaneous
Thread ID:
00497365
Message ID:
00497373
Views:
10
This message has been marked as a message which has helped to the initial question of the thread.
>I have a report that were made two years ago that use the data environment in the report and it use the SET FILTER TO command to filter out what it doesn't need. However, it happen sometime (and even often) that it is empty, so then it display an blank page and go away. I want to add some code where it would display a message indicating that there is no record. (my customer thought it was because it was a bug). If I use RECCOUNT(), it always gives me the number of record in the table without the filter, so this doesn't seem to work. Is there a function that will return the number of record with the filter on..? or is there any other way I can do this?

You could use COUNT, but you can avoid it and speed performance by just checking for existence with something like LOCATE or SEEK first. That is,
LOCATE FOR some condition
IF FOUND()
  SET FILTER TO ...
ELSE
  Messagebox('No Records Found')
ENDIF
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Previous
Reply
Map
View

Click here to load this message in the networking platform