I just tested this and it works here, so here it goes...
In the
Init event of the dataenvironment, the tables are opened. You could check for EOF() there, and issuing a
RETURN .F.
will prevent the report from printing.
>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?
Sylvain Demers