As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
In a self-service app, a report with PCHOLD FORMAT COM (or COMT) results in a Windows SAVE dialog. Trouble is (a) the HOLD name is not respected; (b) there is no default filetype (I expect .csv); (c) I'd really rather avoid the Save dialog entirely and have the spreadsheet open in the browser (or Excel depending on settings), just like FORMAT EXCEL does.
Any ideas?
[WF 7.1.4, Win 2003 server]
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
Were you ever able to resolve this issue? I also would like "PCHOLD FORMAT COMT" to behave like 'PCHOLD FORMAT EXCEL". I don't understand why file extension ".csv" is not used with format COMT.
Thanks, Ted
Dev Studio 8.0.09 App Studio 8.2.01 DB2, FOCUS PDF, HTML, Excel, CSV In Focus since 1983
How about FILEDEFing the output file to somewhere on the server, accessable by the client, and then entering into an HTMLFORM where you have an onload script that changes the page location to the file?
Tony, Thanks for your reply. I'm testing this on my local box(localhost). If my Filedef is "FILEDEF SAVCSV DISK C:\ibi\apps\session\savcsv.csv", what would I put for "file://servername/folder/filename.csv"?
Dev Studio 8.0.09 App Studio 8.2.01 DB2, FOCUS PDF, HTML, Excel, CSV In Focus since 1983
Apologies, the "folder" should have been "network share".
For instance, I use this method to load a file created using a reiterative process that adds many an output to a new sheet in a web archive (Excel templates). However, I need to HOLD the final output as an .xls file and not a PCHOLD file, which leaves it as an .xht (see below). This is so that the drilldowns will function and not screw up(esp. when using the back button!!), also so that the file doesn't have to be saved by the User.
In the following I have used ficticious naming.
There a network share called "Userdata" which just happens to be on the reporting server ("WFServer" - yep, imaginative!). I FILEDEF the file to this location -
FILEDEF Output&Cnt.EVAL DISK c:\Userinfo\Output&Cnt.EVAL.xls
where &Cnt is the iteration, as I never know how many sheets I'll need.
Works like a dream, especially as the open subroutine in the VBA reformats all the worksheets (including page size, print area etc. etc.), adds cell calculations and then saves itself before removing the VBA code.
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
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Thanks again for your help. The following code works great on my PC:
FILEDEF SAVCSV DISK C:\ibi\apps\session\savcsv.csv -RUN -* TABLE FILE CAR PRINT CAR MODEL DEALER_COST RETAIL_COST SALES ON TABLE SAVE AS SAVCSV FORMAT COMT END -RUN -* -HTMLFORM BEGIN
Page Title <script language=javascript> function fetch_src() { this.location.href = "file://WD-OH1CCTA4Q510/session/savcsv.csv"; }
If I run the following (using Dev Studio in another environment(not localhost)):
TABLE FILE CAR PRINT COUNTRY CAR MODEL DEALER_COST RETAIL_COST SALES ON TABLE SET PAGE-NUM OFF ON TABLE SAVE AS SAVCSV FORMAT COMT END ? FILEDEF
I get this:
NUMBER OF RECORDS IN TABLE= 18 LINES= 18 Lname Device Lrecl Recfm Append Filename SAVCSV DISK 105 V /opt/eda/ibi/srv71/wfs/edatemp/ts003840/savcsv.csv
Finally my question. Is there a way to get the JavaScript to point to this file(../edatemp/ts003840/savcsv.csv) and work the same as it does above when I "FILEDEFed" savcsv.csv to my local drive and ran on my PC(localhost)?
This whole issue could be avoided if WebFOCUS would just put an extension(.csv) on the file when you do an "ON TABLE PCHOLD FORMAT COMT"(as it does with "ON TABLE PCHOLD FORMAT EXL2K").
Thanks, Ted
Dev Studio 8.0.09 App Studio 8.2.01 DB2, FOCUS PDF, HTML, Excel, CSV In Focus since 1983
I would not suggest you leave any temporary file in EDATEMP as it would require you to issue SET TEMPERASE = OFF, and as many a poster will testify, that is not a good idea.
Also, assuming you have TEMPERASE=ON (default) the file will no longer exist by the time your user gets the HTML redirect.
As for the PCHOLD issue, yes it would avoid the problem but then, as I mentioned above, it would require the User to remember to save the file if they required it as a permanent report, and we know how intelligent some Users can be .
BTW - FORMAT EXL2K is not exactly true Excel format. Again see many posts explaining this!
Glad you managed to get it to work.
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
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004