FoxPro Generalized Runtime command

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

FoxPro Generalized Runtime command

Post by LarryAndrew » Mon May 21, 2001 10:05 pm

I have developed a user interface that interacts with a database file to determine what options to use on a given report.____Since all the reports go to one interface, I need to know if there is some way to pass a public variable report number to the command line to run a report.____The syntax I use for a single report is:__RUN /N RRWRUN rrwact32 1 /OC:output_____I have a global variable for the report number, gnReportNo.____Can someone help me with the syntax to pass that variable to the Run line command? I cannot get it to function unless I use the literal report number, 1,2,3... etc.____Thanks in advance for any help.____Larry

kwestfall
Posts: 5
Joined: Tue Oct 10, 2017 12:44 pm

=> RE: FoxPro Generalized Runtime command

Post by kwestfall » Tue May 22, 2001 1:20 pm

What you can try is to create a temporary file to use in place of rrwact32 (rrtemp for example), that holds just the record of the report you want to run. Then you don^t need to pass the report number at all. Your run command would be as follows:____RUN /N RRWRUN rrtemp 1 /OC:output ____If you are in a multi-user environment, make sure the file name is random (you can use SYS(3) to generate the name).____To create the temp file, you can use the COPY command in Foxpro, something like:____rrtemp = SYS(3)+".dbf"__USE rrwact32 && or SELECT, if already open__GOTO gnReportNo && to get to the record of the correct report __COPY NEXT 1 TO &rrtemp && copies just the one record____*-- call run command using variable file name__RUN /N RRWRUN &rrtemp 1 /OC:output ______Hope this helps. Might not be the prettiest solution, but it worked for me!____Kristi__

Post Reply