Page 1 of 1

Running Multiple Reports

Posted: Thu Feb 26, 2004 10:01 am
by Robert_Seidman
I want to shell out from a Visual Foxpro application using runtime and a control file to run 3 different reports in a row.____My problem is getting the program to stop until the first report is finished, before I run the 2nd report, and then to stop after running the 2nd report, before I run the 3rd report.____I know the solutions lies somewhere with the RRUNOUT.dbf, but I can^t figure out how to do it.____Any ideas?____I thank you in advance for your time and attention.____Robert Seidman

=> RE: Running Multiple Reports

Posted: Fri Feb 27, 2004 11:28 am
by Rick_W_Johnson_(Guest)
Robert, __This is probably not the most elegant solution, but it is what I do in this situation. I use Visual dBase. I run 7 reports back to back , all about the same length. What I do is put a Pause of 3 seconds in the program when the program goes from one to the next report. This gives the files time to close, but does not start the next report too soon. The three seconds is not even noticed in the actual running. Hope this helps, even though I know there is a more elegant solution.____Rick Johnson

==> RE: Running Multiple Reports

Posted: Fri Feb 27, 2004 11:53 am
by Robert_Seidman
I greatly appreciate your reply, but it does not solve the problem. With each report, I would like the user to have the option of choosing to view or print, and then to select the printer. Unless you know how long they will be doing all of this (including the time they spend viewing the report on screen), you do not know when to start the next report. If you start the next report too soon, you will have all sorts of dialogue boxes opening for new reports before the old reports have concluded.____I still think the solution lies with the RRUNOUT.DBF, but I am not quite there yet.____Thanks anyway.____RHS

===> RE: Running Multiple Reports

Posted: Fri Feb 27, 2004 2:39 pm
by kfleming
If you are using a DBF control file then each report should run in succession.____Kathleen__R&R Support

====> RE: Running Multiple Reports

Posted: Mon Mar 01, 2004 2:47 pm
by Robert_Seidman
Thank you for your input, but what I want to do , is stop after the first report is run and ask the user if the report ran correctly.__If it has, then it would start the next report.____Once you shell out to R&R, my next Visual Foxpro command runs immediately, rather than waiting for the report to finish.____So before the report finishes, a screen comes up asking whether it printed correctly. This screen should only appear after the report has printed.____Can this be done?____Thank you.____RHS

=====> RE: Running Multiple Reports

Posted: Tue Mar 02, 2004 4:02 pm
by Thomas_Freitas_(Guest)
The problem is in the fox program as it is in Visual dBase. The system will continue on the the next level since it does not know that an outside program is being used.____If you call up another program to run each report, the continuation should not take palce until that report is finished.____Another thing you might trying to do is create a control file for running reports. If you would like to see an example using Visual dBase, you can go to my website, http://www.railsoft.com and click on "Guided Tour-Billing System", then click on reports toward the bottom of the menu.____I don^t know if any of this helps or not, but good luck anyway.

=> RE: Running Multiple Reports

Posted: Tue Apr 06, 2004 4:56 pm
by Rob_Nilsen_(Guest)
Is there a reason why you don^t use the R&R ActiveX component? If you use that, you could run the report synchronously. It is better than "shelling out" for the apps I^ve done like what you^ve described.