Page 1 of 1
FoxPro Generalized Runtime command
Posted: Mon May 21, 2001 10:05 pm
by LarryAndrew
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
=> RE: FoxPro Generalized Runtime command
Posted: Tue May 22, 2001 1:20 pm
by kwestfall
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__