FIX: Report Fails When Printing Under Windows NT 4.0Last reviewed: December 18, 1997Article ID: Q168523 |
The information in this article applies to:
SYMPTOMSWhen printing some reports under Windows NT, Visual FoxPro causes a Dr. Watson error such as the following:
Exception: Access Violation (0xc0000005)This may happen when printing a report multiple times in a loop.
RESOLUTIONUse the following code to ensure that the appropriate fields in the report file are null-terminated, as FoxPro expects. Run this code to process the reports in the current directory:
* Get list of report files in current directory. nNumReports = ADIR(aReports, "*.FRX") * Loop through reports FOR nCurrentReport = 1 TO nNumReports USE (aReports[nCurrentReport,1]) EXCLUSIVE ALIAS FRXFILE * Add terminating null to printer information record. REPLACE ALL expr WITH expr + CHR(0) ; FOR objtype = 1 AND RIGHT(expr,1) != CHR(0) PACK USE NEXT STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug has been fixed in Visual Studio 97 Service Pack 2. For more information on the Visual Studio 97 Service Pack 2, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q170365 TITLE : INFO: Visual Studio 97 Service Packs - What, Where, and Why Keywords : buglist5.00 FxtoolReportdes vfoxwin vfpbug5.0a VS97FixlistSP3 kbprint VS97FixlistSP2 Version : 5.0 5.0a Platform : WINDOWS Issue type : kbbug Solution Type : kbfix kbservicepack |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |