Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Saving the oupt of a fex file on the client Machine

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Saving the oupt of a fex file on the client Machine
 Login/Join
 
Guru
posted
Hi,

I have created a report that output in DBASE format. The issue is that the file is created on the server instead of the client machine.
Can somebody help me find out how to do that.

Thanks in advance.

This message has been edited. Last edited by: Kerry,


WebFocus 7.6.5
AND WebLogic server as web server
sql2005 as database server
 
Posts: 273 | Location: Europe | Registered: May 31, 2007Report This Post
Master
posted Hide Post
Try ON TABLE PCHOLD if the file will be interactively created or FILEDEF if the file is to be automatically created.

- ABT

quote:
Originally posted by Majid Jeddi:
Hi,

I have created a report that output in DBASE format. The issue is that the file is created on the server instead of the client machine.
Can somebody help me find out how to do that.

Thanks in advance.


------------------------------------
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
 
Posts: 561 | Registered: February 03, 2010Report This Post
Virtuoso
posted Hide Post
You cannot PCHOLD a DBASE file.
What you can do is FTP it from the server to your machine.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Expert
posted Hide Post
Something that I did many years ago, was to write the output to the users network home drive, perhaps you could do this ?


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Guru
posted Hide Post
Hi

Thanks to all of you for your suggestions.

The issue is that the users running the report are not part of my network.

Regards.


WebFocus 7.6.5
AND WebLogic server as web server
sql2005 as database server
 
Posts: 273 | Location: Europe | Registered: May 31, 2007Report This Post
Master
posted Hide Post
An option if your WebFOCUS Client and Reporting Server are on the same box would be to have the WebFOCUS procedure create the file into a folder that woudl be accessable from the Web Server (there is usually a approot alias defined on the web server) say an output folder. Then use a script to create a zip file with the DBASE file inside of it. At the end of the webfocus procedure send the use back an html file with a link to there zip file. You'll want to be sure that each zip file and DBASE file are unique. And you will want to also perform some type of cleanup on that folder to delete the old DBASE files and Zip files.




Scott

 
Posts: 865 | Registered: May 24, 2004Report This Post
Expert
posted Hide Post
You can PCHOLD the dbase file, with some extra code.
TABLE FILE CAR
PRINT COUNTRY
ON TABLE HOLD FORMAT DBASE
END
-RUN
! DIR
FILEDEF DBF DISK hold.dbf
-RUN
SET HTMLFORMTYPE = DBASE
-HTMLFORM DBF


You will still have to set up mime types in the admin console.


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Guru
posted Hide Post
Hi Waz,

I have edited the file mime but could not find an entry for DBASE.
I could not run this example successfully.

Regards


WebFocus 7.6.5
AND WebLogic server as web server
sql2005 as database server
 
Posts: 273 | Location: Europe | Registered: May 31, 2007Report This Post
Guru
posted Hide Post
Hi Waz

i have edited the file mime on the server and prior to that i made a copy of it and added a line for DBASE.
i went after the console and could see the changes i did. But this does not have any effect on the example you sent.
Any other thing to check?

Thanks

Majid.



quote:
Originally posted by Waz:
You can PCHOLD the dbase file, with some extra code.
TABLE FILE CAR
PRINT COUNTRY
ON TABLE HOLD FORMAT DBASE
END
-RUN
! DIR
FILEDEF DBF DISK hold.dbf
-RUN
SET HTMLFORMTYPE = DBASE
-HTMLFORM DBF


You will still have to set up mime types in the admin console.


WebFocus 7.6.5
AND WebLogic server as web server
sql2005 as database server
 
Posts: 273 | Location: Europe | Registered: May 31, 2007Report This Post
Expert
posted Hide Post
Is there an equivalent assiciation in Windows ?


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Guru
posted Hide Post
Hi Waz,

Yes dbf files are associated with dbx.exe. This is the software that we use to open dbf files.

Regards.


WebFocus 7.6.5
AND WebLogic server as web server
sql2005 as database server
 
Posts: 273 | Location: Europe | Registered: May 31, 2007Report This Post
Expert
posted Hide Post
Where did you change the mime settings ?

Did you bounce the web app server?


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Guru
posted Hide Post
Hi Waz,

There is a mime file on the server. I look at it and saw how it was built then i duplicate on of the lines and adjusted it to DBASE.

Note: Prior to that i made a backup of the original file.

Regards.


WebFocus 7.6.5
AND WebLogic server as web server
sql2005 as database server
 
Posts: 273 | Location: Europe | Registered: May 31, 2007Report This Post
Expert
posted Hide Post
Where is the mime file, what app does it belong to ?


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Guru
posted Hide Post
It is in this directory on the server

D:\ibi\WebFOCUS77\client\wfc\etc

Regards.


WebFocus 7.6.5
AND WebLogic server as web server
sql2005 as database server
 
Posts: 273 | Location: Europe | Registered: May 31, 2007Report This Post
Expert
posted Hide Post
You're at the limits of my knowledge. I would have thought that this would work.

I would suggest talking to Techsupport.


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Guru
posted Hide Post
Hi Waz,

Thanks in way. Your Idea would be perfect for me if it worked.

Regards.


WebFocus 7.6.5
AND WebLogic server as web server
sql2005 as database server
 
Posts: 273 | Location: Europe | Registered: May 31, 2007Report This Post
Guru
posted Hide Post
What if...

You HOLD the file in a directory that your web server would have access to then build a URL that points to the file you just created?

We do something like that when retrieving PDF documents that are stored in a SQLMSS table as blobs.

Step one - assign a random name to the file and create the URL:
-DEFAULTH &TMP_EXT = 'pdf' ;
-SET &TMP_RAND2 = RDUNIF('D12.8') * 26;
-SET &TMP_RAND3 = RDUNIF('D12.8') * 26;
-SET &TMP_RNDALPH1 = DECODE &TMP_RAND2(0 'Z' 1 'A' 2 'B' 3 'C' 4 'D' 5 'E' 6 'F' 7 'G' 8 'H' 9 'I' 10 'J' 11 'K' 12 'L' 13 'M' 14 'N' 15 'O' 16 'P' 17 'Q' 18 'R' 19 'S' 20 'T' 21 'U' 22 'V' 23 'W' 24 'X' 25 'Y' 26 'Z');
-SET &TMP_RNDALPH2 = DECODE &TMP_RAND3(0 'Z' 1 'A' 2 'B' 3 'C' 4 'D' 5 'E' 6 'F' 7 'G' 8 'H' 9 'I' 10 'J' 11 'K' 12 'L' 13 'M' 14 'N' 15 'O' 16 'P' 17 'Q' 18 'R' 19 'S' 20 'T' 21 'U' 22 'V' 23 'W' 24 'X' 25 'Y' 26 'Z');
-SET &TMP_RAND = RDUNIF('D14.12') * 100000000;
-SET &TMP_RANDNAME = &TMP_RNDALPH1 | &TMP_RNDALPH2 |&TMP_RAND | '.' | &TMP_EXT;
-SET &TMP_RANDPATH = '[..]\ibi\ibitmp\' | &TMP_RANDNAME ;
-SET &TMP_RANDURL = 'https://[hostname]/ibitmp/' | &TMP_RANDNAME ;  

Note: I replaced some path-specific code with [..]
You don't have to randomize the file name. We do it to eliminate the possibility of file saving 'collisions'

We are running Tomcat as our web server so we had to create a context document that points to the directory [..]/ibi/ibitmp
[..]\ibi\tomcat\conf\Catalina\localhost\ibitmp.xml
<?xml version="1.0" encoding="UTF-8"?>
<Context
    cachingAllowed="false"
    docBase="[..]\ibi\ibitmp">
</Context>  



Step two - open the URL:
-HTMLFORM BEGIN
<HTML>
<IFRAME id=iframe1 SRC="!IBI.AMP.TMP_RANDURL;" height=100% width=100%>
</HTML>
-HTMLFORM END
  

If the user has a mime type set then the file should open. Otherwise it should prompt them to save it.

Lastly, I put a scheduled batch file on the server to delete the contents of the ibitmp directory some time during the night.

Regards,

Dan


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
 
Posts: 393 | Location: St. Paul, MN | Registered: November 06, 2007Report This Post
Gold member
posted Hide Post
Hello everybody,

just a quick hint on the HTMLFORM solution: Please be aware that WF (at least still in my 7.7.01 ver) performs some changes to the data stream provided in a HOLD file when "putting it out" using -HTMLFORM.

quote:
SET HTMLFORMTYPE = DBASE
-HTMLFORM DBF


Btw.: In an MRE env. you might also want to add a -mrnoedit before the -HTMLFORM.


At least for me, this does not work for all binary files like PDF. I do not know the structure of DBASE files but if they contain binary code this might be true here, too.
I believe -HTMLFORM interprets all data provided as "text with \n and a max. line length". Binary data as PDF files might not be returned "byte-exact" as the input was.

(E.g. tried with static PDF "WebFOCUS Special Newsletter Dec 2010" - did not work)


Therefore you might want to opt for the solution Dan proposed or you could wrap a base64 encoded version of your hold file (e.g. using powershell or java helper class) into an MHT file and use
SET HTMLFORMTYPE=MHT
-HTMLFORM MHT_HOLD


Cheers Linne


WebFOCUS 7.7.03
 
Posts: 67 | Registered: January 05, 2011Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Saving the oupt of a fex file on the client Machine

Copyright © 1996-2020 Information Builders