Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fatal exception error when printing to ASCII file

Status
Not open for further replies.

FoxDave

IS-IT--Management
Feb 12, 2003
15
GB
When printing to an ASCII text file I get a Fatal Exception error C00000005. I have tried removing any printer information from the frx file by clearing the TAG, TAG2 and EXP memo fields but this makes no difference.

The error does not occur when printing to the default printer.
 
Are you printing the ASCII text file through the Generic / Text Only printer driver, or through something else? (What?)

What version and service pack level of VFP are you using? Is this happening in the developer IDE or in the runtime? If RT, does it exactly match the developer Ver/SP? What OS are you running under?

Rick
 
Rick

My test machine is set up with an an HP 4100 Laserjet as its default printer.

My application is a standalone executable developed using Visual Foxpro v7 service pack 1. The operating system of my test machine is Windows 2000.

The application is running on the same machine as the developer IDE.

Thanks

Dave
 
Dave

Yes, I have sufficient rights because the files are only being written to C:\Temp directory. The problem was at first intermittant but has become more frequent as I have tried to address it.

Thanks

Dave
 
Have you done some cleanup in the temp directory? Gotten rid of temp files, run a defrag, scandisk and so on?
Sometimes the repeatedly used clusters get trashed and need to be refreshed.
Is there a chance you are trying to write to a file already opened with the same name?


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Dave

The file names are generated automatically using a fixed string plus a string conversion of the date and time. I have been having the same problem on two different machines. I will do as you suggest and tidy the hard disks.

Thanks

Dave
 
Dave,
I'd try switching to the Generic / Text Only printer driver (it really should be installed on everyone's machine) just for this report option.

I'd also check for an updated printer driver for that LJ printer. (W2K is suppose to support both the old and the new printer driver types, but it has problems with some - especially if you haven't updated to SP4.)

Rick
 
HI

I suggest to add a printer in the system something like HP4L or EPSON LQ2180. You dont have to set this as your default printer. The installation process, could provide some drivers or whatever you call that (because I cannot strictly call the correction factor as drivers) which solves some of these HP4100 type printer related issues.

:)

____________________________________________
ramani - (Subramanian.G) :)
 
I have installed a genric text only printer as an additional printer and when this is selected as the default then there problem goes away. However the problem is switching backwards and forwards between printers when you want to print a report as compared to saving it as an ASCII text file.

Thanks

Dave
 
Dave,
Switching the current VFP printer is really pretty easy:
Code:
SET PRINTER TO NAME gentxtonly
REPORT FORM myReport TO FILE myfile ASCII
SET PRINTER TO default
If you "know" when you are printing to a file, it shouldn't be hard to bracket the REPORT command with the SET PRINTER commands.

Rick
 
Rick,Ramani and Dave

Thank you all for your help, the problem is now solved. The Fatal Exception error is caused by the HP 41000 Laserjet print driver. The solution is to set up an additional printer "Generic / Text Only" and then in the code use the following sequence suggested by Rick when you need to print an ASCII file.

SET PRINTER TO NAME "Generic / Text Only"
REPORT FORM myReport TO FILE myfile ASCII
SET PRINTER TO DEFAULT

I have also remoived any driver information from the .frx file by clearing the TAG, TAG2 and EXP memo fields.

Thanks Again

Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top