Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to force a report to print when there are no records
Message
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00391053
Message ID:
00391064
Views:
14
>>How can I force the report to print when there are no records? The user demands a printout even if there are no records! (She files all reports every month, even if there are no records in a particular report, she needs to file it anyway) :\
>
>Detect if there are no records (this may be done with _tally if you are using a SQL statement or using COUNT TO. If there are no records create a cursor and put 1 blank record into it. Example:
>
>
>SELECT this, that, theother FROM DodiTable WHERE x = y INTO CURSOR cReport
>IF _TALLY = 0  && no data, fake some data to allow report to run
>   CREATE CURSOR cReport (this c(3), that n(7), theother D)
>ENDIF
>SELECT cReport
>REPORT FORM DodiReport TO PRINTER PROMPT
>
Oops. But APPEND BLANK on the next line after CREATE CURSOR
Previous
Reply
Map
View

Click here to load this message in the networking platform