I am trying to save the ouptut from a report to a local drive. Below is the command:
ON TABLE SAVE FILENAME 'C:\FOCUS\TEST.PDF' FORMAT PDF
Below is the error message:
(FOC350) ERROR WRITING OUTPUT FILE: SAV*****
I was at the summitt this past week. According to the person I spoke with in the Expert's Room, this should work. I have spoken with my WF administrator, he tells me that WF should not be the problem.
Anyone have any input?This message has been edited. Last edited by: Kerry,
7.6.4, Windows XP SP 2 XLS, PDF, HTML output formats
June 10, 2010, 12:25 PM
Tom Flynn
George,
Welcome to the Forum.
I disagree with the statement that "this should work", though...
WebFOCUS Programs are stored and executed on the "Reporting Server", that is where "files" are stored as well.
How does the server know the IP address of "your C drive"?
You save files on the Reporting server and FTP to another server/machine; you can APP MAP the server/machine via the Reporting server in edasprof.prf and SAVE to the MAPped DRIVE:\\foldername
? 350 -EXIT
Displays the message: An I/O type error prevented the file named from being written.
This may mean there are zero records to SAVE, OR, C:FOCUS is not a folder on the Reporting Server.
Tom is right and I think that under a proper context, the person who told you that it should work may be right too.
If you run your code using Developer Studio and/or a Reporting Server physically running in your desktop computer then ON TABLE SAVE ... will create the file in the specified location.
This works as expected using my local environment:
TABLE FILE CAR
PRINT CAR BY COUNTRY
ON TABLE SAVE FILENAME C:\mycars.pdf FORMAT PDF
END
If your Reporting Server runs somewhere else (as usually is the case in a Production environment) then it simply won't work as you intended due to the well explained reasons Tom provided you with.
Another possible explanation is that it attempts to "ON TABLE SAVE FILENAME 'C:\FOCUS\TEST.PDF' FORMAT PDF" and that "C:" is the C drive of the reporting server to which you do not have that kind of write access... Try allocating it to your C drive.
June 10, 2010, 10:28 PM
Waz
George, I think we need to know where you are running the program, locally on your PC or on a server somewhere, before we can make any suggestions that may be useful.
Also, just in case, can you post your code.
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
June 11, 2010, 02:59 AM
<JG>
Also bear in mind that the directory/folder must exist because WF cannot create a folder
June 11, 2010, 03:21 AM
Tony A
quote:
because WF cannot create a folder
This is true from your syntax, however you can check for the folder existance before your file save and create it if necessary -
CMD IF NOT EXIST "C:/FOCUS" MKDIR "C:\FOCUS"
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
June 11, 2010, 07:31 AM
Madasabear
Not forgetting the most basic of all. Make sure you don't have the test.pdf already open
Sure, PCHOLD works, but only for loading files that the brwoser knows how to handle. And this will never result in a file on your local disk, it will only try to open the files that's being sent, not store it. If you want that, you'll have to do it manually.
Another option I once tried (successfully) was to: 1. create a share on my local PC to hold the file 2. give everyone full control to that share 3. in the fex add a line to add a network connection with the NET USE command 4. do an APP MAP to that newly created drive 5. do APP HOLD to the newly created APP MAP.
This is a very static solution and is not advisable. But, if you really need it, this may work for you.