At 06:04 PM 1/7/2013, Tom Frederick wrote:
Our network has added an off-site location about 2 miles away. Using
compiled v95,
a VPN connection, and a terminal server. The database remains on
Drive Y on our
in-house server and I thought all the processing actually occurs
there. Nothing
goes to each computer except screen shots. Response is pretty good.
Reports all
follow the same process : complete data, create PDF, check/store it,
then print
it. Works every day at our in-house network. Going off-site we can't
get the PDF
file back to our Network Drive Y for storage:
1. Here is my code to create the file name:
SET VAR vCurrDir TEXT = ((CVAL('CurrDir'))+'\PDFs\')
SET VAR vStDate TEXT = (sstrip(((CTXT(.#DATE))),'/'))
SET VAR vStTime TEXT = (sstrip(((CTXT(.#TIME))),':'))
SET VAR vDateTime TEXT = (.vStDate+'_'+.vStTime)
SET VAR vRep TEXT = ReportName
SET VAR vRepTitle TEXT = ((CTXT(.vZID))+'_'+.vRep+'_'+.vDateTime+'.PDF')
SET VAR vFileName TEXT = (.vCurrDir + .vRepTitle)
From here it goes through a standard PDF process stored in a table
and driven by
variables adjusted for each report.
On the Network, CurrDir is 'Y:' while on my development machines
CurrDir is 'C:'.
There is no C:\PDFs\ directory on the off-site computer. Normally the process
creates a PDF on 'vCurrDir' and the user can decide to keep it or
erase it. How
can I make sure off-site '.vCurrDir' returns to server 'Y:\PDFs\? Is there
something special about VPN connection terminology we are missing?
Tom,
A few suggestions to debug the command to make sure that the PDF file
is actually
created in the correct folder on the in-house server while running
the script on
a terminal server.
01. Simplify the code that creates the "vRepTitle" and "vFileName" variables
-- Make sure that the variable "vZID" is pre-defined accordingly
SET VAR vRep TEXT = 'ActualReportNameHere'
SET VAR vRepTitle TEXT = +
((CTXT(.vZID))+'_'+.vRep+'_'+(FORMAT(.#NOW,'MMDDYYYY_HHNN'))+'.PDF')
-- Notice the "NN" for minutes when using .#NOW (not a typo)
SET VAR vFileName TEXT = ((CVAL('CURRDIR'))+'\PDFs\'+.vRepTitle)
02. Now find the exact file name and make sure that it all make sense
CLS
PAUSE 2 USING .vFileName CAPTION 'Defined File Name' ICON INFO +
BUTTON 'Press any key to continue ...' +
OPTION MESSAGE_FONT_NAME Tahoma +
|MESSAGE_FONT_COLOR NAVY +
|MESSAGE_FONT_SIZE 11 +
|THEMENAME Longhorn
RETURN
Hope that provides you with some blue's clues ...
Very Best R:egards,
Razzak.
www.rbase.com
www.facebook.com/rbase
--- RBASE-L
================================================
TO POST A MESSAGE TO ALL MEMBERS:
Send a plain text email to [email protected]
(Don't use any of these words as your Subject:
INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH,
REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP)
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: INTRO
================================================
TO UNSUBSCRIBE:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: UNSUBSCRIBE
================================================
TO SEARCH ARCHIVES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: SEARCH-n
(where n is the number of days). In the message body,
place any
text to search for.
================================================