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.
When I embed HTML, generated with the TABLE command, within an HTML page, an outline of my code looks something like this:
TABLE FILE HOLDIT
output html tags here..
ON TABLE HOLD AS CLFD FORMAT ALPHA
END
-RUN
-HTMLFORM BEGIN
<html>
more html goes here
!IBI.FIL.CLFD;
more html goes here
</html>
-HTMLFORM END
I have recently been asked to look at someone else's code, that does the same type of thing. That code looks like this:
TABLE FILE HOLD1
output html tags here..
ON TABLE HOLD AS HTMTBL1 FORMAT HTMTABLE
END
-RUN
-HTMLFORM BEGIN
<html>
more html tags go here
-HTMLFORM HTMTBL1
-HTMLFORM BEGIN
more html tags go here
</html>
-HTMLFORM END
My question is: Is it correct coding practise, to include TABLE generated code via '-HTMLFORM filename'?
Background: I've been asked to look at this code, because we believe it might be causing the following error: 'Unknown error occurred. Agent on reporting server x may have crashed. Please investigate reporting server log.'
Regards, DaveThis message has been edited. Last edited by: Kerry,
Pilot: WebFOCUS 8.2.06 Test: WebFOCUS 8.1.05M Prod: WebFOCUS 8.1.05M Server: Windows Server 2016/Tomcat Standalone Workstation: Windows 10/IE11+Edge Database: Oracle 12c, Netezza, & MS SQL Server 2019 Output: AHTML/XLSX/HTML/PDF/JSCHART Tools: WFDS, Repository Content, BI Portal Designer & ReportCaster
Dave: It is not good practice to code it the way you see it. However (at least in IE), it does work. The end result is that you have the code for 2 HTML pages being shown together. Some browsers may not be as forgiving.
Diptesh WF 7.1.7 - AIX, MVS
Posts: 79 | Location: Warren, NJ, USA | Registered: October 25, 2006
David, i of course agree with what Francesco and Diptesh have said. the error you're getting is a server error, and the code you're addressing is browser code. so i'ld look deeper into your fex bits to see whats up. in your first example, you're holding FORMAT ALPHA and in your second, you're holding HTMTABLE. Be sure you know that your ALPHA file, with some html bracketing it, actually renders in a webpage. -s
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
My first concern would be to try and find out which part of the code is causing the crash. I'ld do that by running the fex bit by bit until it fails. That would give me the part of the fex that is violating some rule by crashing. The challenge then is to find the cause and remedy it.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
Many thanks to everyone for making this a great discussion.
I'll attempt to respond to everyone:
Each example in the 'Embedding HTML Commands in a Procedure' and 'Embedding a Procedure in and HTML Web Page' shows the escape code syntax (!IBI.FIL.reportname), but not the -HTMLFORM filename syntax. That is why, I think I've favored the escape code syntax. However, the -HTMLFORM syntax, in chapter 5 does state that you can use -HTMLFORM filename, for HOLD files. Therefore, I am thinking that -HTMLFORM filename is not the source of the server error (agent crash).
Thanks for noticing that not every -HTMLFORM BEGIN, is paired with a -HTMLFORM END. I noticed that too, and am in the process of fixing this situation. I am hoping that this is the source of the server error.
Unfortunately, I cannot recreate the server (agent) crash. It occurs sporadically; we have only been able to trace it to when a set of procedures run.
Pilot: WebFOCUS 8.2.06 Test: WebFOCUS 8.1.05M Prod: WebFOCUS 8.1.05M Server: Windows Server 2016/Tomcat Standalone Workstation: Windows 10/IE11+Edge Database: Oracle 12c, Netezza, & MS SQL Server 2019 Output: AHTML/XLSX/HTML/PDF/JSCHART Tools: WFDS, Repository Content, BI Portal Designer & ReportCaster
There was a time long ago (3.x or 4.x) when you could 'stack' a series of -HTMLFORMs, and the cumulative HTML would get rendered. My experience indicates that in recent releases the first one is honored and the remainder go to the bit-bucket. -- So, if the program harks back to that era, you'll have to rework it.
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005