Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 297803 - Last Review: February 11, 2005 - Revision: 4.1
FIX: Visual FoxPro crashes when two instances of the preview window are active
This article was previously published under Q297803
If you attempt to preview a report for a second time while a preview window from that report is still active, Visual FoxPro (VFP) may crash.
Test for an existing window by using the
WEXIST function. To do this, add the following code before the REPORT command in the code that is given in the "More Information" section.
IF WEXIST("Report Designer - testreport.frx") <existing code> ENDIF
VFP detects that a window is already open for this report and does not attempt to open a second preview window for the same report.
This problem was corrected in Microsoft Visual FoxPro version 7.0 for Windows.
Steps to Reproduce Behavior
To reproduce the behavior, run the following code:
*!* Q297803 FIX: Visual FoxPro Crashes When Two Instances of REPORT FORM PREVIEW Are Active
SET SAFETY OFF
CREATE CURSOR test (field1 C(10))
INSERT INTO test VALUES ("Alec")
INSERT INTO test VALUES ("Seregil")
CREATE REPORT testReport FROM test
REPORT FORM testReport PREVIEW NOWAIT
INSERT INTO test VALUES ("Nysander")
REPORT FORM testReport PREVIEW NOWAIT
APPLIES TO
- Microsoft Visual FoxPro 3.0 Standard Edition
- Microsoft Visual FoxPro 3.0b Standard Edition
- Microsoft Visual FoxPro 5.0 Standard Edition
- Microsoft Visual FoxPro 5.0a
- Microsoft Visual FoxPro 6.0 Professional Edition
| kbbug kbcodesnippet kbfix kbreportwriter kbvfp700fix KB297803 |
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate