Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]HTMLFORM to open a document via an url - Not working in 8204 gen48
Go
New
Search
Notify
Tools
Reply
  
[SOLVED]HTMLFORM to open a document via an url - Not working in 8204 gen48
 Login/Join
 
Virtuoso
posted
Hi,

I have the following that works great under 8201M gen240 but not able to make it work under 8204 gen48

-HTMLFORM BEGIN
<html>
<head>
<meta http-equiv="refresh" content="0; url=!IBI.AMP.#FILE_PATH;!IBI.AMP.FILE_NAME;">
</head>
</html>
-HTMLFORM END

It give me a blank page
The url is valid and I can open the document
It look like this :
\\serverName\folder1\folder2\folder3\folder4\documentName.pdf


Doing a View source I have only the below displayed. Like if there is nothing between the two tag
-HTMLFORM BEGIN
-HTMLFORM END

I found few other "version" on how to call the url but with no luck
I have also tried to hardcode the url instead of variable, no luck either (but I really need it as a variable)

Can't figure what has changed in 8204 that prevent this to work

Any other ideas ?

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


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2145 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Virtuoso
posted Hide Post
What does it print if you change that to?:
-HTMLFORM BEGIN
<html>
<body>
content="0; url=!IBI.AMP.#FILE_PATH;!IBI.AMP.FILE_NAME;"
</body>
</html>
-HTMLFORM END


I'm a bit suspicious of the variable !IBI.AMP.#FILE_PATH;. Do you actually have an amper-variable &#FILE_PATH? I'm not even sure that's a valid variable name...

Or is that hash an anchor hash that's meant to be in the URL somewhere else, as in?:
url=!IBI.AMP.FILE_PATH;#!IBI.AMP.FILE_NAME;


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 :
 
Posts: 1642 | Location: Enschede, Netherlands | Registered: August 12, 2010Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Thanks for your input Wep but no success.

The result is that I have this displayed on screen
content="0; url=\\serverName\folder1\folder2\folder3\folder4\fileName.pdf"


Yes the &#FILE_PATH exist as a valid variable and it does work everywhere else except to reference and open a pdf file
I don't think that it's an issue with variable the since, as I stated, I've tried with hardcoded path & file name and it doesn't work either

As per example, I have the following in several fex that works great where I have the image displayed
COMPUTE EXL_EXPRT /A150 = '<IMG SRC="file:' || '&#FILE_PATH.EVAL' || 'excel_small.gif" style="border-style: none;" alt="' || '&#ASEXL.EVAL'   || '">'; NOPRINT


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2145 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Virtuoso
posted Hide Post
That looks like a file-path to some Windows share. Only Internet Explorer tolerates URL's like that, the other browsers plain refuse.

For similar cases, we placed locations like that under a web-server and reference the files like URL's on that server. That way, no browser has issues with them.

Whether that applies to your situation I cannot tell.


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 :
 
Posts: 1642 | Location: Enschede, Netherlands | Registered: August 12, 2010Reply With QuoteReport This Post
Virtuoso
posted Hide Post
quote:
Only Internet Explorer tolerates URL's like that, the other browsers plain refuse.

You are right Wep, but since in the organisation I am, the rule is to use IE, up to now I was not concerned of using these type of url
But now it seems that with WF8204 something has changed regarding this

I will validate with TechSupport and maybe I will have to change the way to reference files...

Thanks again


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2145 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Guru
posted Hide Post
Is the -HTMLFORM in the same procedure that creates the pdf file?

Is the pdf created by WebFOCUS saving the pdf to a file directory?

What is setting the variables &#FILE_PATH and &FILE_NAME (these are not WF system variables)?

What do you get when you -TYPE these variables?
 
-TYPE &#FILE_PATH
-TYPE &FILE_NAME 


Hallway
WF(Prod):8202M
WF(Test):8202M
OS/Platform:Win 10
Outputs:All
 
Posts: 421 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Reply With QuoteReport This Post
Guru
posted Hide Post
quote:
Doing a View source I have only the below displayed. Like if there is nothing between the two tag
  
-HTMLFORM BEGIN
-HTMLFORM END


This is because if you scroll up in the source, the html code from the -HTMLFORM block is showing in the DOM. Look in the DOM for the rendered code. There is no need to duplicate this in the &ECHO. Just change the content in your meta tag from 0 to 60. This will give you 60 seconds to inspect the DOM before it refreshes to the new URL

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


Hallway
WF(Prod):8202M
WF(Test):8202M
OS/Platform:Win 10
Outputs:All
 
Posts: 421 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Reply With QuoteReport This Post
Guru
posted Hide Post
quote:
It look like this :
\\serverName\folder1\folder2\folder3\folder4\documentName.pdf


One last thought. What happens on your end when you change the back slash to a forward slash?
  
-SET &FILE_NAME = 'documentName.pdf';
-SET &#FILE_PATH = '\\serverName\folder1\folder2\folder3\folder4\';
-SET &#FILE_PATH = REPLACE(&#FILE_PATH, '\', '/') ;
-TYPE &#FILE_PATH&FILE_NAME;

-HTMLFORM BEGIN NOEVAL
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta http-equiv="refresh" content="0; url=!IBI.AMP.#FILE_PATH;!IBI.AMP.FILE_NAME;">
    <title>!IBI.AMP.FILE_NAME;</title>
</head>
</html>
-HTMLFORM END


Hallway
WF(Prod):8202M
WF(Test):8202M
OS/Platform:Win 10
Outputs:All
 
Posts: 421 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Reply With QuoteReport This Post
Virtuoso
posted Hide Post
quote:

Is the -HTMLFORM in the same procedure that creates the pdf file?
Is the pdf created by WebFOCUS saving the pdf to a file directory?

No, the PDF is an existing one that I'm trying to reference. The PDF is not created from a ON PCHOLD FORMAT PDF

quote:

What is setting the variables &#FILE_PATH and &FILE_NAME (these are not WF system variables)?
What do you get when you -TYPE these variables?

The variable a properly setup. The same code is working good using WF8201M, just not working with WF8204
Something such as
\\serverName\folder1\folder2\folder3\folder4\fileName.pdf


quote:

What happens on your end when you change the back slash to a forward slash?

Changing back-slash by slash then result in a 404 error


It's a strange issue because if I execute from the RDP server the report, I can have the PDF file loaded and displayed properly but when I run from my computer (or from anywhere outside the server where WF8204 is installed), it doesn't work.

I have a similar issue with images that are stored on the same public folder (which is where &#FILE_PATH is referring).
It's a valid UNC that can be accessed properly with Windows Explorer and IE when I type in the address bar the location and file name.

I still have to test some stuff requested by TechSupport

The strangest thing is that it works when ran locally on the server where reside WF8204 but not from outside when there is no problem at all with WF8201M


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2145 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Virtuoso
posted Hide Post
I have found a work around that fix the problem for now.

I have changed IIS from Windows Authentication to Anonymous Authentication.

It is supposed to be SSO with Windows Authentication but since that for now it's used as a dev server for me only until I can have the SSO properly setup I will work with IIS setup this way.


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2145 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Expert
posted Hide Post
Hi Martin,

If your need is PDF then also checkout EDAGET using binary. A few old posts on the point should give you enough details.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.06 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5595 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]HTMLFORM to open a document via an url - Not working in 8204 gen48

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.