Focal Point
[CLOSED]How to link to a MS Word Doc on a Shared Drive Linux

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

January 09, 2017, 10:02 AM
Doug
[CLOSED]How to link to a MS Word Doc on a Shared Drive Linux
How do I link to a MS Word Doc which resides on a Windows Shared Drive from within an iFrame in a Portal Tab?
OS:Linux
This is the link which works when pasted into Windows Explorer:
file:\\mysite.net\doug\SHARED\Exception Reports\Functional Documentation.docx

The bottom line: I need to access a MS Word Doc which resdes on a Windows Shared Drive from within an iFrame which has Auto Execute set to True. The iFrame is the only item in that page which should display the MS Word doc.

So, what am I missing here?

Thanks, Doug

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




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
January 09, 2017, 10:11 AM
Squatch
It might be as simple as using forward slashes instead of backslashes. Try that if you haven't already.


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
January 09, 2017, 10:21 AM
Squatch
Sorry, it looks like there is a little more to it than that...

You need to also substitute HTML percent codes for characters your browser can't support; in particular, spaces... like so:

file://mysite.net/doug/SHARED/Exception%20Reports/Functional%20Documentation.docx



App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
January 09, 2017, 10:22 AM
Doug
Thanks... But: Nope. That gave WebFOCUS Error (8005) ... Unregistered Error.

It automatically adds "IBFS:/Testfile" as a prefix to my entry. I have a meeting with IB this afternoon. I'll ask them then and post my findings... Unless someone can come up with a solution before then.

Thanks, Doug
January 09, 2017, 10:23 AM
Wep5622
That (using a path to a share) only really works in Internet Explorer.

The more reliable approach is to put those documents under a web-server's document root and link to is using an HTTP (or perhaps FTP) URL.

We found that it's possible to create IIS virtual directories on remote shared directories, that could work for you.

Securing that is a different matter though.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
January 09, 2017, 10:25 AM
Wep5622
quote:
Originally posted by Doug:
I adds "IBFS:/Testfile" as a prefix to my entry.


Don't add IBFS:/ for files that are not on IBFS Wink


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
January 09, 2017, 10:26 AM
Squatch
Doug, did you see my second post?

I actually did a test here and it worked for me.


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
January 09, 2017, 10:28 AM
Doug
Thanks Wep5622: That was a typo which I just corrected.
It should have been "It automatically adds "IBFS:/Testfile"
January 09, 2017, 10:32 AM
Doug
quote:
Doug, did you see my second post?

Yep, That didn't work for me, still:
1) Added "IBFS:/Testfile" prefix
2) And displayed: WebFOCUS Error (8005) ... Unregistered Error.

May be a 8007 VS 8105 difference. I do have a 8105 machine on which I can try it.
January 09, 2017, 10:33 AM
Squatch
I did not test in an iFrame, but this worked for me in a Google browser for a URL:

file://webfocusdev/balanced_scorecard/Nursing%20Executive%20Dashboard_Feb2016_v2.pdf

From my laptop, I can bring up Google Chrome, then paste the above link as the URL and it brings up a PDF document from my "WEBFOCUSDEV" remote server and "balanced_scorecard" Windows share.


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
January 09, 2017, 10:34 AM
Squatch
Permissions problem on the Windows share, maybe?


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
January 09, 2017, 10:34 AM
Doug
quote:
I did not test in an iFrame, but this worked for me in a Google browser for a URL:


Yeah, I can do that as well. I'm only interested in getting it to display from an iFrame, in a Tab, in a Portal.

The slashes can be either way "/ or \".
January 09, 2017, 10:38 AM
Squatch
Doug, I just tested in an iFrame and my PDF appeared just fine.

<!DOCTYPE html>

<html>
<head>
<title>iFrame and Windows share</title>
</head>
<body>

<iframe id="iframe1" src="file://webfocusdev/balanced_scorecard/Nursing%20Executive%20Dashboard_Feb2016_v2.pdf"></iframe>

</body>
</html>



App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
January 09, 2017, 10:42 AM
Squatch
Well, my test worked fine outside of WebFOCUS and with Chrome... with IE 11 it wanted to open the PDF in a new window. In Firefox, the iFrame appeared but it was empty.


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
January 09, 2017, 11:02 AM
Doug
Thanks again Squatch, Please try it with a docx file. That'll give me hope Smiler... I'm just doing the presentation of a docx file which someone else if editing. So, no control over the format. I'm still troubled with the "IBFS:/Testfile" prefix being automatically added.
January 09, 2017, 11:49 AM
Squatch
With a docx file:

Chrome: Automatically downloads instead of displaying in iframe
Firefox: Nothing happens, just a blank iframe
IE 11: Asks if I want to download... nothing in iframe.


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
January 13, 2017, 08:32 AM
Doug
Maybe I can save the users doc as pdf and use that instead. I'll try that.

I'm with IBI next week, so I'll check it out with them directly and post my findings.
January 13, 2017, 03:03 PM
susannah
If you can link to the remote location from within your fex, then
CMD COPY c:/mysite.net/doug/SHARED/Exception%20Reports/Functional%20Documentation.docx myreport.docx
copies the file into your agent
then you have a less complicated link to write.
If you can't COPY directly, then do a
CMD NET USE to temporarly link to the file's location, then CMD COPY ...
That's how I do it... but I don't have blanks in my filenames, just makes it easier.
I don't know the unix equivalents of the dos CMD statement, tho.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
January 13, 2017, 05:57 PM
Doug
Thanks so much Susannah, I'll check it out.

PS: Let me know the next time you're in Nashville Smiler
January 14, 2017, 10:22 AM
George Patton
I looks like the issue here is how to issue a command from Linux that gets implemented in Windows. It's easy enough to transfer files to and from Linux from the Windows side using utilities like PSCP (google that). Maybe a product like SAMBA is what you need. Alternatively you can schedule automatic uploads of your Windows file using PSCP so that it is always available in the latest version on the Linux server.


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP