Focal Point
Saving Output to Local Computer

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

March 12, 2008, 04:20 PM
Dan Stoll
Saving Output to Local Computer
Hello -

I'm having trouble saving a report output to my local computer (HOLD or SAVE - I don't care because I don't need the master file.)

The query runs fine, but I get errors writing the output file.

I'm pretty sure (but not positive) this has to do with set up, environment, permissions, etc. and not so much with issuing the FILEDEF or ALLOC command.

Thanks in advance for any suggestions.
March 12, 2008, 04:25 PM
Darin Lee
You would need to do an ON TABLE PCHOLD or use ON TABLE SET ONLINE-FMT=output type to allow it to return to the browser and let your file assocations handle the open/save functionality.

ON TABLE HOLD, ON TABLE SAVE, FILEDEF and ALLOC only refer to locations relative to the server where WF is running. They will never return data to a local PC (unless your WF server has a mapped/shared drive to your local PC.)


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
March 12, 2008, 04:54 PM
Dan Stoll
Darin -

Thanks for the suggestion. ON TABLE PCHOLD AS [filename] FORMAT [fileformat] does not result in a file being saved to my local computer.

I've tried ON TABLE PCHOLD ... along with FILEDEF but still no local file.
March 12, 2008, 05:12 PM
GinnyJakes
Dan,

Please update your profile signature with your product suite, releases, and platforms so that we might better help you.

Unless you are running WebFOCUS on the PC that you work on, as Darin said, you will never get the file as it is written to a directory where the reporting servers resides. You would have to allocate it permanently with a filedef and then ftp it to your desktop.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
March 12, 2008, 05:17 PM
Darin Lee
That's really all there is to it. ON TABLE PCHOLD FORMAT PDF would open Adobe Reader (if the browser has that association) or a dialogue box to open or save if it does not have the association. Same for EXL2K, ALPHA, etc. One exception would be that you cannot PCHOLD FORMAT FOCUS. Why, I don't know, but it is documented that way.

The only other thing I can think of is that you have some browser tool or pug-in that is not allowing file transfers and such. I don't think a pop-up blocker would have any effect, but you might try turning them off and testing.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
March 13, 2008, 08:56 AM
PBrightwell
If you are wanting this as a flat file on your computer you would have to have your computer mapped as a drive on the server where it is running. Kind of an ugly solution. The FTP option is actually much better. You may be able to code the FTP instructions into your fex or through report caster.


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
March 13, 2008, 09:08 AM
Dan Stoll
Thanks for all the information and suggestions. I will work with the WF administrator to save the output to the reporting server.
March 13, 2008, 09:21 AM
GinnyJakes
quote:
Please update your profile signature with your product suite, releases, and platforms so that we might better help you.


Dan, don't forget to do the above.

If you want to save a data file to the reporting server, you don't necessarily need to involve the administrator. You can do it right in your focexec.

One method is to use the APP HOLD directory_name. This will save the hold file and the master in the directory you specify. If the directory is not in your ibi/apps, you can do an APP MAP first to point to it. If you only want to save the data file, you can say APP HOLDDATA. Please look up these commands in Advanced Search.

Another method is APP FI or FILEDEF which are equivalent commands, the former being the more current syntax. This allows you to specify exactly where the file is supposed to go. Please look up this command as well.

Good luck.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
March 14, 2008, 09:10 AM
<dab448>
Try this code.
-*The user must have write permission the drive/server for this to work
-*
FILEDEF DAVE DISK \\YOURCOMPUTERNAME\C$\DAVE.XLS
-RUN
TABLE FILE CAR
PRINT
MODEL
SEATS
COMPUTE SEATSPLUS/I2 = SEATS + 1;
BY COUNTRY
BY CAR
ON TABLE SAVE AS 'DAVE' FORMAT EXL2K FORMULA
END

Hopefully this will work for you