VFP 7, RUN Command, & R&R 10

Meeting place for R&R customers and clients to share tips and ideas. Post your questions, messages or problems here.
Post Reply
Hack426
Posts: 7
Joined: Tue Oct 10, 2017 12:44 pm

VFP 7, RUN Command, & R&R 10

Post by Hack426 » Sun Apr 13, 2003 1:57 pm

I need some help.____I am using VFP 7 and a RUN command to call R&R Ver. 10. My code is:____RUN /N rrwrun <rpt> /r /d /o____My issue is I want VFP to wait until R&R is done before VFP continues so that general clean up can be done as the form unloads. The "/N" has to be in the RUN command so that another Windows app can be called, but to VFP the "/N" also means no wait and continue processing. I have tried putting____RUN "/N rrwrun <rpt> /r /d /o"____but VFP still continues.____Does anyone know if there is a switch or anything I can add into my RUN command so that the "/N" works to call another Windows app and yet still have VFP wait until R&R is done?____Thanks.____Hack

Tom_Freitas_(Guest)
Posts: 32
Joined: Tue Oct 10, 2017 12:44 pm

=> RE: VFP 7, RUN Command, & R&R 10

Post by Tom_Freitas_(Guest) » Sun Apr 13, 2003 3:18 pm

I use Visual dBase, which is similar. The run command should be the last statement in you module. I created a menu that calls up a program first that assigns variables. It then calls another program to run the report based on the variables. When it is finished, it returns to where it left off on the first program. That is were I then call up another program. I hope that makes since to you. If not, let me know and I will try to explain it better.____Good Luck____Tom

Hack426
Posts: 7
Joined: Tue Oct 10, 2017 12:44 pm

==> RE: VFP 7, RUN Command, & R&R 10

Post by Hack426 » Sun Apr 13, 2003 10:53 pm

Sir, I understand, but that still does not fix the issue. VFP still continues on after the RUN command with unloading the screen. I want VFP to stop processing until after the RUN command is done, then finish the calling modules and then unload the form.____Any other help?

Thomas_Freitas_(Guest)
Posts: 123
Joined: Tue Oct 10, 2017 12:44 pm

===> RE: VFP 7, RUN Command, & R&R 10

Post by Thomas_Freitas_(Guest) » Mon Apr 14, 2003 12:11 pm

I create reports in R&R Version 8.1, but use the R&R Version 10.xxx to run the reports. The first screen or form is the report form. This screen does all the selecting, using list boxes, it also has choices for number of copies, headers and so on. Once this report has processed all the information, I then go to the rpt_sel form. This is the report selection form. In here the information from the report form is put together to run the report. Once you select the push button "RUN", the information is processed. The last command line is the actual running of the report. ____The most important function here, is that I do not allow you to leave this form until you have pressed the "Close" push button. This way, it stops the program from processing any further, until you physically tell it to close.____If you have to form close by itself, then it will continue processing, even with R&R running. I hope this helps____Tom__

Hack426
Posts: 7
Joined: Tue Oct 10, 2017 12:44 pm

====> RE: VFP 7, RUN Command, & R&R 10

Post by Hack426 » Mon Apr 14, 2003 10:59 pm

Sir, I^ve rethought your statements and eventhough it wasn^t what I was looking for, I have based my changes on your suggestion. I^ve thrown up a small form which acts as a messagebox to sit and wait for the user to say OK before processing in Fox continues. ____Now I can hault Fox; run the report; then come back to Fox to delete the temp prompt tables used to populate the form, the temp rrunin table, and the temp outfile table; and finally, release all of the report variables before unloading the report form. Exactly what I wanted, just not the method I was initially looking for.____I was hoping the RUN command in Fox would have a switch that stated it was a Windows app that was being called. And then a different switch to say NOWAIT instead of both functions being combined into one.____Thanks, again for your help.

pdempsey
Posts: 56
Joined: Tue Oct 10, 2017 12:44 pm

=====> RE: VFP 7, RUN Command, & R&R 10

Post by pdempsey » Tue Apr 15, 2003 2:49 am

Hack,____We do something similar to Tom except the form the report returns to is the menu of reports. Our routines always start with the report filter, which creates a set of temporary files used by all reports on the particular reports menu. The run command runs the report and the user returns to the menu, where it is very natural to run another report without having to reselect data, or to exit the reports menu.____We delete the rrin and out files just before running the next report so that they are there if we want to look at them. There is a naming convention which prevents network clashes.____-Pat-

KarlaNUt
Posts: 0
Joined: Sun Apr 01, 2018 11:41 am

======> RE: VFP 7, RUN Command, & R&R 10

Post by KarlaNUt » Tue Apr 15, 2003 2:16 pm

What you need is a interface to run the interface modal. The add-in I use is RunModal and is in the Public Domain.____Go to this site and you can download the code. I have been running it for years and it runs great.____http://www.classycomponents.com/Products/RunModal.htm ____Hope this helps.____John__:7

KarlaNUt
Posts: 0
Joined: Sun Apr 01, 2018 11:41 am

=======> RE: VFP 7, RUN Command, & R&R 10

Post by KarlaNUt » Tue Apr 15, 2003 2:38 pm

Sorry, I forgot I had to stop using that one because it does not work in Win NT and 2000.____I use the Process.VCX from the UT (http://www.universalthread.com/) to run PKZIP. On the home page of the UT, click on the Download picture on the left, and choose Visual FoxPro. Enter "api_apprun" in the Title box (without the quotes), and you should get back a link to:__"API_APPRUN in .VCX form February 22, 2003__This contains PROCESS.VCX - a visual class library for the API_APPRUN class described in the FAQ#7789 (API_APPRUN - Executable launch management class). The class gives the ability to run DOS and WinApps from inside VFP using the CreateProcess() API call, and allows you to wait on termination or return immediately, and allows you to examine the execution status and termination code from an executable run by the class. It takes care of managing the process and thread handles, removing some potent..."____Highly recommended!____Again, Hope this helps,____John__:9

Post Reply