Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SYS(1037) Causes C000005 crash if CANCEL/ESC.
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00308812
Message ID:
00308830
Views:
16
>If the following code is run and you hit ESC or click on CANCEL in the Dialog Box the program will crash with C000005 on the CREATE REPORT line. If you click on OK, everything will run fine.
>
>= sys(1037) && Page Setup Dialog Box.
>CREATE CURSOR Dummy (DumField C(1))
>CREATE REPORT TempRpt FROM Dummy
>ERASE TempRpt.Frx
>ERASE TempRpt.Frt
>
>I am using VFP 6.0 SP 3 on Win98.
>
>I have tried this after having set various printers as the Windows Default Printer via Settings -> Printers before running the code including Epson LQ 870 and HP LaserJet 6p with the HP driver and again setup with the Win98 driver.
>
>Can others duplicate the error and does anybody know a solution?
>
>TIA
>
>Ed

Are you missing a REPORT FORM temprpt command?

How about instead of using the SYS(1037) call you do something like this:

CREATE CURSOR Dummy (DumField C(1))
CREATE REPORT TempRpt FROM Dummy
REPORT FORM TempRpt TO PRINTER PROMPT
ERASE TempRpt.Frx
ERASE TempRpt.Frt

Does this help?
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform