Ted,
I usually get that file error if there is an invalid
character in the filename. I can't see an invalid character in your
filename, unless it is interpreting your last pipe (before OPEN OFF) as part of
the file name. Try replacing '|open off' to ' |open off' (or use an
ampersand instead of a + between the variable and the option).
I have a similar command that works and besides that spaces (I have a
space before each pipe), the only other difference is that I specify the full
path, including the drive letter. I don't think that would matter, if
you're trying to print to a sub directory of the database folder.
Dawn
From: Ted Wolfley
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 28, 2005 9:19 AM
To: RBG7-L Mailing List
Subject: [RBG7-L] - specifying a filename path in print statement
Sent: Wednesday, September 28, 2005 9:19 AM
To: RBG7-L Mailing List
Subject: [RBG7-L] - specifying a filename path in print statement
Hi,
I am trying to print
a pdf report to a subdirectory and am getting a file in use error even though
the file does not exist. Sharing has been set on all
subdirectories.
The commands that I
am using are:
set var vyears=
''05'
SET VAR vyears =
'(''' + .vyears + ''')'
set var filert
='\monthend\2005\ncardmonth92005.pdf'
set var test=('PRINT
ncardmonth WHERE issue_year IN '+ .vyears + ' AND cards_ltd IS NOT
NULL AND active IS NOT NULL ORDER BY issue_year, issue_month OPTION
pdf|filename '+.filert+ '|open OFF')
&test
With the sho var
command, the test variable looks like this:
PRINT
ncardmonth WHERE issue_year IN ('05') AND cards_ltd IS NOT
NULL AND active IS NOT NULL ORDER BY issue_year,
issue_month OPTION
pdf|filename \monthend\2005\ncardmonth92005.pdf|open OFF
If I remove the
subdirectories from the filename variable, the report will
print.
Is there something
that I am missing?
Ted Wolfley
Database/Internet Programmer
The Ogden Group
of
5637
West
phone: (585) 321 1060 x23
fax: (585) 321 0043
[EMAIL PROTECTED]
