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.

New TIBCO Community Coming Soon
In early summer, TIBCO plans to launch a new community—with a new user experience, enhanced search, and expanded capabilities for member engagement with answers and discussions! In advance of that, the current myibi community will be retired on April 30. We will continue to provide updates here on both the retirement of myibi and the new community launch.

What You Need to Know about Our New Community
We value the wealth of knowledge and engagement shared by community members and hope the new community will continue cultivating networking, knowledge sharing, and discussion.

During the transition period, from April 20th until the new community is launched this summer, myibi users should access the TIBCO WebFOCUS page to engage.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] How to Get WebFocus Source Code below the Report?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] How to Get WebFocus Source Code below the Report?
 Login/Join
 
Member
posted
Hi All,
I want to display the executed source code used to generate the report,below the report in a separate message box. How can i achieve this ?

Please help me.

Thanking You Guys......!!

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


7.6.11, Windows
Excel, HTML,PDF
 
Posts: 28 | Registered: April 11, 2011Report This Post
Virtuoso
posted Hide Post
With a little searching and creative thinking on your part, you can figure out a way to do that. You'll need to switch on user tracing, run the report and hold it, switch off tracing, process the trace file, hold it, and then present the resulting page.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
<JG>
posted
/.1.1 and up

quote:
Syntax: How to Use the Message Viewer
Add the following WFServlet variable to your URL call for WebFOCUS:

IBIWF_msgviewer=optionwhere:

option

Is one of the following:


OFF

Disables the Message Viewer. When this option is disabled, you can still view informative messages or error messages for HTML reports from the view source option in your browser.

ON

Displays messages in a separate browser window.

ECHOON

Displays messages and lines in a separate browser window that are expanded and stacked for execution.

ECHOALL

Displays messages and lines in a separate browser window that are expanded and stacked for execution while also displaying all Dialogue Manager commands.

Note: The ON, ECHOON, and ECHOALL options are available for all output formats including HTML and PDF


If running from dev studio you can turn it on by using the option on the run button
If running from a launch page add it as a hidden input variable
 
Report This Post
Silver Member
posted Hide Post
Place the source code in a database and query it out as needed. Then you can put it anywhere you like on any report.....


7.6.6 Mainframe
7.6.4 Web Focus
Windows

 
Posts: 45 | Location: Gaffney SC | Registered: March 30, 2007Report This Post
Platinum Member
posted Hide Post
To reiterate some things other people have said.

Adding ECHO=ALL will display the source code as a hidden comment at the end of the report.

If you want to actually display this content, you should be able to use JavaScript to walk the DOM and extract that portion of the page and insert it into a Text box.


WF 71.x, 76.x, 7701, 8.0 Beta OS: Linux, Win2k3, Win2k, Win2k8, WinXP


 
Posts: 203 | Registered: November 19, 2007Report This Post
Member
posted Hide Post
quote:
Originally posted by JG:
/.1.1 and up

quote:
Syntax: How to Use the Message Viewer
Add the following WFServlet variable to your URL call for WebFOCUS:

IBIWF_msgviewer=optionwhere:

option

Is one of the following:


OFF

Disables the Message Viewer. When this option is disabled, you can still view informative messages or error messages for HTML reports from the view source option in your browser.

ON

Displays messages in a separate browser window.

ECHOON

Displays messages and lines in a separate browser window that are expanded and stacked for execution.

ECHOALL

Displays messages and lines in a separate browser window that are expanded and stacked for execution while also displaying all Dialogue Manager commands.

Note: The ON, ECHOON, and ECHOALL options are available for all output formats including HTML and PDF


If running from dev studio you can turn it on by using the option on the run button
If running from a launch page add it as a hidden input variable



I hace already done that .. what evere u are saying . bit not getting the expected result.
What to do ?


7.6.11, Windows
Excel, HTML,PDF
 
Posts: 28 | Registered: April 11, 2011Report This Post
Member
posted Hide Post
Depends:

...if you're looking for devstudio feedback -- there's a dropdown next to the run button -click 'message viewer on'(for just -TYPE statements) or 'Display Command Lines'(for all code).

If you're looking for all code in browser 'view/source'...


7.6.10, Winddows X64
all output
 
Posts: 5 | Registered: March 01, 2010Report This Post
Platinum Member
posted Hide Post
The following is an example of the technique I was talking about:

-SET &ECHO=ALL;
TABLE FILE CAR
BY COUNTRY
END
-SET &ECHO=OFF;
-HTMLFORM BEGIN
<SCRIPT>
function getSource(ob){
  var content = document.body.lastChild.textContent;
  var sEnd = content.indexOf("amp;ECHO=OFF;") - 6;
  ob.contentDocument.write('<PRE>' + content.substring(0, sEnd) + '</PRE>');
}
</SCRIPT>
<IFRAME src="about:blank" onload="getSource(this);"></IFRAME>
-HTMLFORM END


WF 71.x, 76.x, 7701, 8.0 Beta OS: Linux, Win2k3, Win2k, Win2k8, WinXP


 
Posts: 203 | Registered: November 19, 2007Report This Post
Platinum Member
posted Hide Post
The above technique works in Firefox, when I have time I'll play around with making it work in IE.


WF 71.x, 76.x, 7701, 8.0 Beta OS: Linux, Win2k3, Win2k, Win2k8, WinXP


 
Posts: 203 | Registered: November 19, 2007Report This Post
<FreSte>
posted
Suppose there are no command-tags besides the one WebFOCUS adds at the end, for IE you can use this:

-SET &ECHO=ALL;
TABLE FILE CAR
BY COUNTRY
END
-SET &ECHO=OFF;
-HTMLFORM BEGIN
<html>
<script>
function getSource() {
  var _commentTags = document.getElementsByTagName("!");
  alert(_commentTags[0].innerHTML);
}
</script>
<body onload='getSource();'>
</body>
</html>
-HTMLFORM END
 
Report This Post
Platinum Member
posted Hide Post
The following code works in Firefox & IE.

-SET &ECHO=ALL;
TABLE FILE CAR
BY COUNTRY
END
-SET &ECHO=OFF;
-HTMLFORM BEGIN
<SCRIPT>
function getSource(ob){
  var content = document.body.lastChild.nodeValue;
  var sEnd = content.indexOf("amp;ECHO=OFF;") - 6;
  ob.contentWindow.window.document.write('<PRE>' + content.substring(0, sEnd) + '</PRE>');
}
</SCRIPT>
<IFRAME src="about:blank" onload="getSource(this);"></IFRAME>
-HTMLFORM END


WF 71.x, 76.x, 7701, 8.0 Beta OS: Linux, Win2k3, Win2k, Win2k8, WinXP


 
Posts: 203 | Registered: November 19, 2007Report This Post
Expert
posted Hide Post
Very interesting, dlogan!


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
Platinum Member
posted Hide Post
For even more fun, the following puts the source code into a TEXTAREA window which can be edited, and a button has been added which allows you to rerun the modified source code.

-SET &ECHO=ALL;
TABLE FILE CAR
BY COUNTRY
END
-SET &ECHO=OFF;
-HTMLFORM BEGIN
<div id='sourceViewer'>
<SCRIPT>
function getSource(ob){
  var content = document.body.lastChild.nodeValue;
  var sEnd = content.indexOf("amp;ECHO=OFF;") - 6;
  ob.contentWindow.window.document.write('<textarea id="ta" style="height:100%;width:100%;">' + content.substring(0, sEnd) + '</textarea>');
}
function rerun(){
  var objDoc = sourceCode.document ? sourceCode.document : sourceCode.contentDocument;
  var code = objDoc.getElementById("ta").value;
  var sourceViewer = document.getElementById("sourceViewer").innerHTML;
  var adhocfex = "-SET " + "&" + "ECHO=ALL;\n" + code + "\n-SET " + "&" + "ECHO=OFF;\n-HTMLFORM BEGIN\n <div id='sourceViewer'>\n" + sourceViewer + "\n</div>\n-HTMLFORM END\n";
  document.getElementById("IBIF_adhocfex").value = adhocfex;
  return true;
}
</SCRIPT>
<IFRAME id="sourceCode" src="about:blank" onload="getSource(this);" frameBorder="0"></IFRAME><br />
<FORM action="/ibi_apps/WFServlet" method="POST" onsubmit="return rerun()">
  <INPUT type="hidden" id="IBIF_adhocfex" name="IBIF_adhocfex" >
  <INPUT type="submit" value="Rerun">
</FORM>
</div>
-HTMLFORM END


WF 71.x, 76.x, 7701, 8.0 Beta OS: Linux, Win2k3, Win2k, Win2k8, WinXP


 
Posts: 203 | Registered: November 19, 2007Report This Post
Expert
posted Hide Post
Crazy, man, crazy!


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
Virtuoso
posted Hide Post
I am going to try this tomoorow .
the idea looks interesting




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report 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     [CLOSED] How to Get WebFocus Source Code below the Report?

Copyright © 1996-2020 Information Builders