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     [SHARING] Embedding Results of TABLE Command In HTML.

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SHARING] Embedding Results of TABLE Command In HTML.
 Login/Join
 
Master
posted
Greetings,

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,
Dave

This 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
 
Posts: 822 | Registered: April 23, 2003Report This Post
Expert
posted Hide Post
I always embed the HTMTABLE format files with !IBI.FIL.HTMTBL1;

I don't know if the -HTMLFORM HTMTBL1 is causing the "Unknown error occurred..." but I'd change the code to verify that.


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
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, 2006Report This Post
Expert
posted Hide Post
The correct syntax for HTMLFORM would be something like this:

-HTMLFORM BEGIN
 <html>
 more html tags go here
-HTMLFORM END
-HTMLFORM HTMFIL1
-HTMLFORM BEGIN
 more html tags go here
</html>
-HTMLFORM END


HTMFIL1 would be a file in the Application folder path.


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
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, 2003Report This Post
Expert
posted Hide Post
quote:
Is it correct coding practise, to include TABLE generated code via '-HTMLFORM filename'?
To add to the discussion, I would answer -"Yes, but not when it is enclosed within -HTMLFORM BEGIN and -HTMLFORM END". That is my belief anyway.

Francis,

What does the documnetation say? I'm surprised that you didn't quote it! .... or is it one of those items that is hidden in the depths?

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Virtuoso
posted Hide Post
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, 2007Report This Post
Master
posted Hide Post
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
 
Posts: 822 | Registered: April 23, 2003Report This Post
Virtuoso
posted Hide Post
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, 2005Report This Post
Expert
posted Hide Post
the bit bucket Good One




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
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SHARING] Embedding Results of TABLE Command In HTML.

Copyright © 1996-2020 Information Builders