Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Force report to preview/print when NO DATA
Message
From
01/06/2004 09:10:15
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
01/06/2004 08:35:07
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00908850
Message ID:
00908865
Views:
11
Humm... In my report classes, I did something similar to the following:
select ... &select - sql
if _tally = 0
  ErrorMsg("No data. You may have to change the selection criteria.")
else
  (continue with report)
endif
Of course, this is only the part about informing the user; I had no actual need to save or print an empty report.

If you do, just create an empty record, as Borislav suggested. You might also add a logical field, "HasData" (or, with inverted logic, "EmptyReport"), to conditionally print titles, to the effect that there is no data.

>Report designer is an obscure tool to me, so apologies in advance...
>
>I have a simple report that is run from a modal prg-based form with private datasession.
>
>It may happen that there are no records to be printed. When that is the case I still want the report to preview and/or print (it is important for the user to know, and be able to file, the report for audit purposes even if all it has is headings and "end of report" on it).
>
>How can I do this?
>
>Thanks in advance
>Jim
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform