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     [SOLVED] Calling an HTML file from inside a fex

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Calling an HTML file from inside a fex
 Login/Join
 
Gold member
posted
Is there a way to call and HTML composer file from inside a fex? I have a page with a list of (radio elements) reports to run. The user clicks a report and the presses the RUN button. This fires off a fex that takes the report id chosen and I would like to redirect to a HTML document that contains parameters for that report. Any ideas?

Daniel

This message has been edited. Last edited by: <Kathryn Henning>,


In Focus since 2012
WebFOCUS 8.0.07
Windows, All Outputs
 
Posts: 59 | Registered: November 15, 2012Report This Post
Expert
posted Hide Post
Developing Reporting Applications > Managing Flow of Control in an Application > Enhancing an HTML Webpage With a Procedure > How to Refer to an External Webpage From a Procedure
-HTMLFORM filename


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Gold member
posted Hide Post
quote:
Francis


Thanks Francis that works but when I try to make the -HTMLFORM statement dynamic like

 
  -HTMLFORM &FILENAME


I get an error saying invalid character in path element. Can I not make this -HTMLFORM dynamic?

Daniel


In Focus since 2012
WebFOCUS 8.0.07
Windows, All Outputs
 
Posts: 59 | Registered: November 15, 2012Report This Post
Gold member
posted Hide Post
Hi Daniel,
I have to admit that I have ran into this question many times. I assume you are developing under repository area?

I have tried also many ways how to make dynamic include either HTML or some FEX.

Regards,


Release: WebFOCUS 8104, AppStudio: 8105
OS: Windows
Output: HTML,Excel,Active Reports
 
Posts: 89 | Registered: November 19, 2013Report This Post
Gold member
posted Hide Post
HI SSander,

I am developing in the managed reporting area. I have some legacy code that is making an -include dynamic so I figured the same can be done with the -HTMLFORM command. I know a workaround but making it dynamic would save a lot of time and typing.

Daniel


In Focus since 2012
WebFOCUS 8.0.07
Windows, All Outputs
 
Posts: 59 | Registered: November 15, 2012Report This Post
Expert
posted Hide Post
This seems to work for me (car_adhoc.htm is in app folder baseapp):

-SET &FILE1 = 'car_adhoc.htm';

-HTMLFORM &FILE1.EVAL


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Gold member
posted Hide Post
Francis,

I tried that and I still get

 
 invalid character found in path element 
 


Looks like it is not evaluating the amper variable.

Daniel


In Focus since 2012
WebFOCUS 8.0.07
Windows, All Outputs
 
Posts: 59 | Registered: November 15, 2012Report This Post
Expert
posted Hide Post
quote:
invalid character found in path element

I have never seen that error before. Is there a WebFOCUS error number associated to this error? Please post some of your code. Perhaps there is something wrong with the value that is in the variable with the file name.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Gold member
posted Hide Post
Here is the code I am using.

-SET &HNAME = 'HADetailedCases.htm';
-HTMLFORM IBFS:/WFC/Repository/ASPCA_Reporter/&HNAME.EVAL


XML Error:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?> 
- <ibfsrpc _jt="IBFSResponseObject" language="EN" localizeddesc="Invalid path IBFS:/WFC/Repository/ASPCA_Reporter/&HNAME.EVAL" name="runAdHocFex" returncode="8005" returndesc="Invalid path IBFS:/WFC/Repository/ASPCA_Reporter/&HNAME.EVAL" subreturncode="0" subsystem="SSYS" type="simple">
- <ibfsparams size="7">
  <entry key="fexContent" value="-* File: IBFS:/Development/WFC/Repository/ASPCA_Reporter/Report1.fex Created by WebFOCUS AppStudio -DEFAULT &REPORTID = 66; -SET &HNAME = 'HADetailedCases.htm'; -HTMLFORM IBFS:/WFC/Repository/ASPCA_Reporter/&HNAME.EVAL" /> 
  <entry key="comp_pass" value="****" /> 
  <entry key="args" value="__null" /> 
  <entry key="nodeName" value="__null" /> 
  <entry key="path" value="IBFS:/WFC/Repository/ASPCA_Reporter" /> 
  <entry key="applications" /> 
  <entry key="comp_user" value="__null" /> 
  </ibfsparams>
- <ibfserrorvalues size="3">
  <entry key="FUNCTION" value="IBFSService.runAdHocFex" /> 
  <entry key="REASON" value="invalid character found in path element; {IBFS_PATH}={IBFS:/WFC/Repository/ASPCA_Reporter/&HNAME.EVAL}; {IBFS_PATH_ELEMENT}={&HNAME.EVAL}; {INVALID_CHARACTER}={'&'}; {AT_INDEX}={1}" /> 
  <entry key="REFERENCE" value="IBFS:/WFC/Repository/ASPCA_Reporter/&HNAME.EVAL" /> 
  </ibfserrorvalues>
  </ibfsrpc>


Error from the portal page:

WebFOCUS Error (8995)
Unregistered error.


In Focus since 2012
WebFOCUS 8.0.07
Windows, All Outputs
 
Posts: 59 | Registered: November 15, 2012Report This Post
Expert
posted Hide Post
easy
just filedef it
and note, you can stack a bunch of html creations one on top of the other
or... put in a TABLE tag and organize your bits side by side or however you want.

-SET &DINGUS = 'TEST_FADE';
FILEDEF THING DISK C:\IBI\APPS\XSUSANTEST\&DINGUS|.HTM

-HTMLFORM BEGIN
!IBI.FIL.THING;
-HTMLFORM END

ps: frankie's way works for me , too
-HTMLFORM &DINGUS|.HTM




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Gold member
posted Hide Post
Hi Susannah,

I tried your example and still getting errors. Thank you for the example. Webfocus just wont resolve the amper variable when used with the -HTMLFORM statement.

Here is the xml error when I tried you example:

 <ibfsrpc _jt="IBFSResponseObject" language="EN" localizeddesc="Cannot include resource specified &HNAME.EVAL" name="runAdHocFex" returncode="1020" returndesc="Cannot include resource specified &HNAME.EVAL" subreturncode="0" subsystem="SSYS" type="simple">
 


Daniel


In Focus since 2012
WebFOCUS 8.0.07
Windows, All Outputs
 
Posts: 59 | Registered: November 15, 2012Report This Post
Expert
posted Hide Post
Yes, it looks like there's no way to make this work inside the Content area of WF. This method does work when the files are on the reporting server. It's an old annoyance that we had in MRE. It looks like the same annoyance is now in WF8.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Master
posted Hide Post
I believe this conversation comes down to the internal matrix and order of operations. It has long been asked to do this same thing with the -INCLUDE command as well. The issue is that the -INCLUDE executes before the &variables are resolved. Is it possible that the same issue is here for -HTMLFORM statement? Since this is essentially an INCLUDE, I would assume that it happens in the same place, and &variables aren't resolved until after the -HTMLFORM has been resolved. The long suggested workaround has been to use GOTO commands instead.


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
 
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013Report This Post
Master
posted Hide Post
Another thought....

Isn't there a new feature in App studio to allow you to chose which report to run dynamically? Why are you doing it through the fex?

If you aren't using app studio, you could always write the Javascript to do it as well. Essentially the form has a list of Request IDs to execute. At the bottom of the XML will be a list of requests. You would need to have a request defined for each report and your javascript would then need to update the request_list value of the FORM Element. When you update your radio button, update the FORMs request_list and you dynamically fire off the relevant report.


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
 
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013Report This Post
Gold member
posted Hide Post
Hi Eric,

My landing page has a list of reports (radio elements) that a user can select and then click a run button to run the selected report. The HTML that is called contains parameters that the user will need to provide before running the report. That is why I am trying to call an HTML page from a fex. I am using app studio so I'm not sure the JavaScript rout will work.

Dan


In Focus since 2012
WebFOCUS 8.0.07
Windows, All Outputs
 
Posts: 59 | Registered: November 15, 2012Report This Post
Gold member
posted Hide Post
Hi Daniel

If you can use a fex to retrieve the parameters then you can populate a control on the parent HTML page. You can open a case with TS to see if we have an alternative approach.

Thanks Barry


WebFOCUS 8103, Windows, App Studio
 
Posts: 80 | Location: NYC | Registered: November 13, 2008Report This Post
Virtuoso
posted Hide Post
quote:
-SET &HNAME = 'HADetailedCases.htm';
-HTMLFORM IBFS:/WFC/Repository/ASPCA_Reporter/&HNAME.EVAL


One approach that seems to work is:
-SET &HNAME = 'HADetailedCases.htm';
-HTMLFORM BEGIN
<html>
<script>
window.open ("http://servername/ibi_apps/views.bip?BIP_REQUEST_TYPE=BIP_RUN&|BIP_folder=IBFS:/WFC/Repository/contentfoldername&|BIP_item=&HNAME")
</script>
</html>
-HTMLFORM END


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Expert
posted Hide Post
I'm sure we can come up with many workarounds, the question remains - why does it work with fexes/html on the reporting server but not in the Content area?


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
you can make this work on the front end by including the '-HTMLFORM ' bit along with the &var containing the htm name. Much the same as you have to do with '-INCLUDE ' when you're on the front end (mre), and not the backend (apps).
eg:
APP PATH whateveryouneed
-DEFAULT &MYPAGE = 'MYMENU.HTM';
-SET &MYSTRING = '-HTMLFORM ' | &MYSTRING ;
&MYSTRING.EVAL

or...
FILEDEF THING DISK C:\IBI\APPS\appname\&MYPAGE
-HTMLFORM BEGIN
!IBI.FIL.THING;
-HTMLFOR END
obv... if your page has just been created in your fex and is sitting in your agent, no FILEDEF is needed. if you page is sitting on the front end somewhere, a longer location statement is needed, eg: c:\ibi\webfocusnn\basedir\{domain}\app\mypage.htm




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Master
posted Hide Post
Daniel,

There are many ways to accomplish what you are talking about. Alan has a good suggestion. Also there was a post thats been being discused the last few days that uses a redirect to accomplish something similar ( http://forums.informationbuild...1057331/m/1417075476 ).

For me, I would do it in the HTML page itself. I would use the display element to control whether my control appear or are hidden etc. I can think of a number of different ways I would do this. If you're using app studio, I think using the dynamic fex selection is your best way to do it. Its built in functionality and Barry would be able to help you with it. Ypu'ld be surprised the nuggets of knowledge you can get on tricks for the html composer from the IBI guys.

At the end of the day its whatever your comfortable with. But for me, I'd build that on the web end.


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
 
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013Report This Post
Gold member
posted Hide Post
I want to thank everyone for making great suggestions. I have plenty of examples to work with. Thanks again!

Daniel


In Focus since 2012
WebFOCUS 8.0.07
Windows, All Outputs
 
Posts: 59 | Registered: November 15, 2012Report This Post
Virtuoso
posted Hide Post
quote:
why does it work with fexes/html on the reporting server but not in the Content area?


It has to do with order of processing for execution (and nothing to do with TABLE's internal matrix).


A fex file in Content can use -INCLUDE either as a directive to the Content manager ("client"), or as a directive to the reporting Server.

  • With MRNOEDIT to escape it, the Client blindly passes the -INCLUDE as-is (minus the MRNOEDIT keyword) to the reporting Server, when the fex file in Content is uploaded for execution, and any amper variable gets evaluated later, in the Server's execution context, as the Server prepares to perform the -INCLUDE file operation. But after evaluation of amper variables, the directive has to boil down to a valid reference to a fex file located *on the Server*; there is no syntax to direct the Server to fetch a file from the Content area.

  • Without MRNOEDIT, the -INCLUDE directs Client to locate the specified file in Content, upload a copy to the server along with the rest of the request, and convert the -INCLUDE directive into a valid server-side -INCLUDE that will reference the uploaded copy. But the "specified file" must be explicit. There is no support for making the reference dynamic (using an amper variable), simply because Client does not execute any code; in that context, "&" is just another character, and the complaint "invalid character found in path element" is quite apt.


Similarly for -HTMLFORM: If Client intercepts it, to handle references to HTM files in Content, the reference must be static. When the Server executes it, it could be "dynamic" (involving amper variables), but ultimately it must reference a file on the Server, not in Content.

Alan B's solution skirts the issue with redirection: having the Server (blindly) send an HTML response page that makes the browser send a request for a Content file, with the file's name (etc.) supplied by amper vars.


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report 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     [SOLVED] Calling an HTML file from inside a fex

Copyright © 1996-2020 Information Builders