I have three seperate FoxPro 2.6 DB servers scattered across Alaska. I have created a web page (Thanks to Dave S. and thread184-469531 ) Each of the three files works great and pushes to the web with no problem. Here is my question. The code is the same on each of the three files with the exception of 3 lines (File location, publish location etc) Right now I have to run each cvrt file individually, can I make just one cvrt file with the three seperate code pages and only have to DO TestCVRT once instead of three time? Below is the code for one, what I am trying to say is can I just copy and paste the code from the 2nd and 3rd file into the first one and have it run? How would I pass the parameters from 1-2, 2-3?
SET EXCLUSIVE OFF
USE R:\RTLPAS10\RFMSS35\DATA\REQUEST.DBF
DO WHILE .T.
WAIT WINDOW NOWAIT 'Waiting... <Esc> to exit, any other key to update now.'
x=INKEY(300) &&... 300 seconds = 5 minutes.
IF x = 27 &&... Escape key pressed
EXIT
ENDIF
DO MakeHTML WITH DATE(), DATE() + 90, ;
"X:\Inetpub\
DO MakeHTML WITH DATE() + 91, DATE() + 180, ;
"X:\Inetpub\
DO MakeHTML WITH DATE() + 181, DATE() + 260, ;
"X:\Inetpub\
DO MakeHTML WITH DATE(), DATE() + 365, ;
"X:\Inetpub\
ENDDO
CLOSE ALL
FUNCTION MakeHTML
PARAMETERS UseDate, EndDate, OutFile
SELECT USEDAY, ENDDAY, TRAINING, ;
UnitName, Tra_Area ;
FROM Request ;
WHERE BETWEEN(USEDAY,UseDate, EndDate );
ORDER BY USEDAY;
INTO CURSOR tmp
SELECT tmp
&&... Use 'OutFile' parameter instead of actual file name
SET TEXTMERGE TO (OutFile)
SET TEXTMERGE ON NOSHOW
\\<HTML><HEAD><TITLE>Requests by Date</TITLE></HEAD>
\<BODY>
\<TABLE BORDER=5 ALIGN=CENTER WIDTH=70%>
nCounter = 0
SCAN
IF (nCounter % 20)=0 &&... every 20 rows
\<TR>
\ <TH>Use Day
\ <TH>End Day
\ <TH>Training to be Conducted
\ <TH>Using Unit
\ <TH>Range/Training Area
\</TR>
ENDIF
nCounter = nCounter + 1
\<TR>
\ <TD><<Useday>>
\ <TD><<ENDDAY>>
\ <TD><<Training>>
\ <TD><<UnitName>>
\ <TD><<Tra_Area>>
\</TR>
ENDSCAN
SET TEXTMERGE TO
RETURN
Thanks,
Bill
SET EXCLUSIVE OFF
USE R:\RTLPAS10\RFMSS35\DATA\REQUEST.DBF
DO WHILE .T.
WAIT WINDOW NOWAIT 'Waiting... <Esc> to exit, any other key to update now.'
x=INKEY(300) &&... 300 seconds = 5 minutes.
IF x = 27 &&... Escape key pressed
EXIT
ENDIF
DO MakeHTML WITH DATE(), DATE() + 90, ;
"X:\Inetpub\
DO MakeHTML WITH DATE() + 91, DATE() + 180, ;
"X:\Inetpub\
DO MakeHTML WITH DATE() + 181, DATE() + 260, ;
"X:\Inetpub\
DO MakeHTML WITH DATE(), DATE() + 365, ;
"X:\Inetpub\
ENDDO
CLOSE ALL
FUNCTION MakeHTML
PARAMETERS UseDate, EndDate, OutFile
SELECT USEDAY, ENDDAY, TRAINING, ;
UnitName, Tra_Area ;
FROM Request ;
WHERE BETWEEN(USEDAY,UseDate, EndDate );
ORDER BY USEDAY;
INTO CURSOR tmp
SELECT tmp
&&... Use 'OutFile' parameter instead of actual file name
SET TEXTMERGE TO (OutFile)
SET TEXTMERGE ON NOSHOW
\\<HTML><HEAD><TITLE>Requests by Date</TITLE></HEAD>
\<BODY>
\<TABLE BORDER=5 ALIGN=CENTER WIDTH=70%>
nCounter = 0
SCAN
IF (nCounter % 20)=0 &&... every 20 rows
\<TR>
\ <TH>Use Day
\ <TH>End Day
\ <TH>Training to be Conducted
\ <TH>Using Unit
\ <TH>Range/Training Area
\</TR>
ENDIF
nCounter = nCounter + 1
\<TR>
\ <TD><<Useday>>
\ <TD><<ENDDAY>>
\ <TD><<Training>>
\ <TD><<UnitName>>
\ <TD><<Tra_Area>>
\</TR>
ENDSCAN
SET TEXTMERGE TO
RETURN
Thanks,
Bill