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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VISUAL FOXPRO IN WIN95/ WIN98 1

Status
Not open for further replies.

rajeevnandanmishra

Programmer
Jun 1, 2001
379
IN
I have a VFP6.0 application. This application runs perfectly under WINNT/WIN2K. But when we try to run this application in WIN9X then we experienced a strange problem.

The problem arises when we follow the following sequence :

From the main form we call a child form (by clicking on a button on main form). The child form is having a button to call generic Print Form (created by us). When user click on that button the print form pops-up. On print form user click on screen button, which shows him the report (through REPO FORM <report_name> PREVIEW). He closes the report. Closes the print form and the sub form.
Now if he do the process again then after clicking on Print button on sub form, it hangs up the system.

So, what could be the reason for this. And what shall we do to resolve this.

Any help will be highly appreciated.

Rajeev
 
Check if the child forms are properly released. This is where I would start.

Regards,

Ilya
 
Thanks for your quick reply Ilya.

I have checked that and it is releasing the previous forms.

And one again i am saying (if you have missed my earlier post) that it is working perfectly on WINNT/WIN2K. Only problem is on WIN9X.
 
rajeevnandanmishra,
Another thread (184-239199 Set printer to not working help!!!)from march 2002, also indicated problem with reports not working in win98 and winME. I noticed that &quot;report form&quot; was used in that code also. No resolution was given.

There are several bugs listed in the Microsoft knowledge base for vfp6 and reporting. On concerns crashing fp if there are two instances of report form active at the same time. I don't know is this will help. I cut and pasted from the knowledge base.

Hope it helps,
JDemmer
God bless


Microsoft Knowledge Base Article - Q297803
FIX: Visual FoxPro Crashes When Two Instances of REPORT FORM PREVIEW Are Active
The information in this article applies to:
Microsoft Visual FoxPro for Windows 3.0, 3.0b, 5.0, 5.0a, 6.0

Symptoms
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.
Resolution
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 &quot;More Information&quot; section.
WEXIST(&quot;Report Designer - testreport.frx&quot;)
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.
Status
This problem was corrected in Microsoft Visual FoxPro version 7.0 for Windows.

More Information
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 (&quot;Alec&quot;)
INSERT INTO test VALUES (&quot;Seregil&quot;)

CREATE REPORT testReport FROM test

REPORT FORM testReport PREVIEW NOWAIT
INSERT INTO test VALUES (&quot;Nysander&quot;)
REPORT FORM testReport PREVIEW NOWAIT
First Published: May 2 2001 11:34AM
 
HI Rajeev,

Quite often, one does the distribution of the executable and dont think about the distribution process, simply because it was installed earlier... etc etc.

I have found out by hard learning, that distributing the setup CD every time is the best.

Often (1) the service packs made available to user and (2) the service packs applied on the execuatble create this type of odd behavious between systems and OS. I have faced similar problems when new executables are supplied and solved them instataneouly by reinstallaing using the setup disks.

Hope this helps you :) ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
Thanks all,

Specially Ramani!

I was knowing the issue that microsoft releases service packs to fix some problems. And i had searched the whole microsoft site, but have not found any patch related to my problem. I have also asked the clients if they can go for a setup-cd or not. But their answer was no (i was knowing it).

Anyway, i download/installed the SP5 for Visual Studio & Recompiled my project. Then distributed the exe & dll(s) to the client. And now, users are happy, client is happy, i am happy and all this just because of u Ramani.

I don't want to write.... But i can't restrict myself to write, that, you are great :)

Rajeev Nandan Mishra
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top