Printing reports causes Exception C0000005 Error or incorrect output (282047)



The information in this article applies to:

  • Microsoft Visual FoxPro for Windows 3.0
  • Microsoft Visual FoxPro for Windows 3.0b
  • Microsoft Visual FoxPro for Windows 5.0
  • Microsoft Visual FoxPro for Windows 5.0a
  • Microsoft Visual FoxPro for Windows 6.0
  • Microsoft Visual FoxPro for Windows 7.0
  • Microsoft Visual FoxPro 8.0
  • Microsoft Visual FoxPro 9.0 Professional Edition

This article was previously published under Q282047

SYMPTOMS

When you print a report, you may receive the following error message:
Fatal Error: Exception C0000005
You might also see incorrect output such as incorrectly spaced information, incorrect fonts, or ASCII characters inserted in the report. Furthermore, the data may print incorrectly.

CAUSE

These problems may occur if the Tag and Tag2 fields of the report have printer code for a printer that is not currently being used.

RESOLUTION

To work around to the problem, delete the contents of the Tag and Tag2 fields. The following code shows how to do this:
 *!* Q282047: PRB: Printing Reports Causes Exception Error C0000005
 *!* Replace MyReport with the name of your report.
 USE MyReport.FRX
 BLANK FIELDS Tag, Tag2
 USE
				

REFERENCES

For additional information on the Tag and Tag2 fields in reports, click the following article numbers to view the articles in the Microsoft Knowledge Base:

257624 Clear report TAG, TAG2, and EXPR fields using .pjx hooks

138396 How to use the default Windows printer in Visual FoxPro

136620 Benefit of storing printer info in a report table (.frx file)

133163 How to control printer attributes for a report at run time

191588 BUG: Create report w/ SYS(1037) saves old printer information


Modification Type:MajorLast Reviewed:2/21/2005
Keywords:kbCodeSnippet kbprb kbReportWriter KB282047 kbAudDeveloper