Focal Point
[CLOSED] Saving output file

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/943102364

June 10, 2010, 11:17 AM
George
[CLOSED] Saving output file
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.

hth

Tom


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
June 10, 2010, 01:21 PM
njsden
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.

So, which one is your case?



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
June 10, 2010, 08:23 PM
Doug
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.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs: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 Smiler


Developer Studio Release : 7.6.11
June 11, 2010, 08:35 AM
ABT
PCHOLD doesn't work?


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
June 11, 2010, 10:05 AM
GamP
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.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
June 17, 2010, 04:42 AM
Yangyang
hi all ,

which access can save the file?

I added the everyone,but still not work...

Thanks,
James


WebFOCUS 7.6.8
WebFOCUS 7.6.10
BI
FLEX
.NET