What I have done to accomplish the same this is to create the file directory as a variable first and then place the variable in the print the print command
 
This part sets the directory where the pdf file will reside.   I use this approach because the week changes and is part of the file name.
SET VAR vweek INTEGER = 200535 (my week designation defined earlier in program....year 2005 week 35.  It is also used in other commands as an Integer first)
SET VAR vdir TEXT = 'C:\Documents and Settings\garywendike\My Documents\'
SET VAR vdir2 TEXT = 'Co-Manage\Replenishment\Smfd Performance\Krista\'
SET VAR vdir3 TEXT = ('Week ' + (CTXT(.vweek)) + ' 13-4-1 Krista.pdf')
SET VAR vfil = (.vdir + .vdir2 + .vdir3)
 
This is last part of print command showing how I use the variable...
    OPTION PDF|FILENAME &vfil|ORIENTATION LANDSCAPE

 I have been using this approach for about 6 months with no problems.
 
I think the problem is how you are defining the variable "filert".   You may need to define the drive and file location completely. 
 
Gary
----- Original Message -----
Sent: Wednesday, September 28, 2005 8:18 AM
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 Rochester

5637  West Henrietta Road

West Henrietta, NY 14586
phone: (585) 321 1060 x23
fax: (585) 321 0043

[EMAIL PROTECTED]

www.ogdengroup.com

 

Reply via email to