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.
-SET &ECHO=ALL;
TABLE FILE CAR
PRINT SALES
BY COUNTRY
BY MODEL
ON TABLE SET ONLINE-FMT HTMTABLE
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLESHEET *
TYPE=REPORT, GRID=OFF, FONT='VERDANA', SIZE=8, $
TYPE=TITLE, STYLE=BOLD, $
TYPE=DATA, COLUMN=COUNTRY, JAVASCRIPT=RunReportDD( COUNTRY ), $
ENDSTYLE
END
-RUN
-HTMLFORM BEGIN
<SCRIPT language='javascript'>
function RunReportDD(vCountry)
{
vReportURL = '/ibi_apps/WFServlet?' + 'IBIF_ex=' + 'DRILL1DD1' + '&|COUNTRY=' + vCountry;
// Construct the Report window's features
vFeatures =
"channelmode=no, directories=no, fullscreen=no, " +
"location=no, menubar=no, resizable=yes, scrollbars=yes, " +
"status=yes, titlebar=no, toolbar=no, "
"left=0, top=0, width=" + screen.availWidth + ", height=" + screen.availHeight;
wRepWindow = window.open(vReportURL, 'wRepWindow', vFeatures);
wRepWindow.focus();
}
</SCRIPT>
-HTMLFORM END
The one problem with this method is that in the drill-down report, the user can right-click and select Properties to see the URL.
You can disable the right-click functionality with something like this:
-SET &ECHO=ALL;
-DEFAULT &TARGET = '';
TABLE FILE CAR
PRINT SALES
BY COUNTRY
BY MODEL
WHERE COUNTRY EQ '&COUNTRY'
HEADING
"DRILL1DD1 / &TARGET"
ON TABLE SET ONLINE-FMT HTMTABLE
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLESHEET *
TYPE=REPORT, GRID=OFF, FONT='VERDANA', SIZE=8, $
TYPE=TITLE, STYLE=BOLD, $
ENDSTYLE
END
-RUN
-HTMLFORM BEGIN
<SCRIPT language=JavaScript>
//Disable right mouse click Script
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com
var message="Function Disabled!";
///////////////////////////////////
function clickIE4()
{
if (event.button==2)
{
alert(message);
return false;
}
}
function clickNS4(e)
{
if (document.layers||document.getElementById&|&|!document.all)
{
if (e.which==2||e.which==3)
{
alert(message);
return false;
}
}
}
if (document.layers)
{
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&|&|!document.getElementById)
{
document.onmousedown=clickIE4;
}
document.oncontextmenu=new Function("alert(message);return false");
</SCRIPT>
-HTMLFORM END
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
Although Francis' method will work nicely, I think Fernando's suggestion might be alittle cleaner. You can use the JSURL setting to load an existing javascript file into your html report. The JS file can then do the rest without having to create any html.
In the focexec, add the following:
SET JSURL=/approot/baseapp/changeatoform.js
Create a file in the baseapp directory called - oddly enough - changeatoform.js, containing the following:
function changeAllA() {
var anchorList = document.getElementsByTagName("a");
for (var i = 0; i < anchorList.length; i++) {
anchorList[i].href = "JavaScript:submitAasForm(\"" + anchorList[i].href + "\");";
}
}
var submit_form = "submit_form";
function submitAasForm(qs) {
var submit_form = document.getElementById(submit_form);
if(!submit_form) {
submit_form = document.createElement("FORM");
if(submit_form) {
submit_form.name = submit_form;
submit_form.id = submit_form;
document.body.appendChild(submit_form);
}
} else {
var children = submit_form.childNodes;
var len = children.length;
for(var i = len-1; i >= 0; i--) {
submit_form.removeChild(children[i]);
}
}
var qsValues = qs.split('?');
submit_form.action = qsValues[0];
submit_form.method = "post";
var keyPairs = qsValues[1].split("&");
for (i=0; i<keyPairs.length; i++) {
if (keyPairs[i] != "") {
// alert(keyPairs[i]);
var keyValues = keyPairs[i].split("=");
var input = document.createElement("INPUT");
if(input) {
input.type = "hidden";
input.name = keyValues[0];
input.value = keyValues[1];
submit_form.appendChild(input);
}
}
}
submit_form.submit();
}
if (window.addEventListener) {
window.addEventListener('load', 'changeAllA', false);
} else if (window.attachEvent) {
window.attachEvent('onload', changeAllA);
} else {
alert("not supported");
}
When your report runs, this will dynamically change all the href's to javascript calls. The javascript will then create a form and all the parameters as hidden input boxes and submit the form as a post.
Hope this helpsThis message has been edited. Last edited by: dhagen,
"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
I tried the JSURL method but that doenst seem to work for me. I am not that familiar with JS so was wondering what to do if I wanted to hide/obscure the URLs for the following multi drill down.
FOCEXEC style keyword will always create a fully-formed URL! The only way to "hide" parameters in it is to either embed them inside of an HTML <form> element using method=post --OR-- issuing an Ajax call to handle the whole process.
Regardless of which method you use, Javascript is the language that will allow you to do that.
Both of the approaches provided by Francis and dhagen work but you will need to get more than familiarized with Javascript to fully enhance the functionality of your reporting applications. Regrettably WebFOCUS cannot completely help you there.
I understand this is an old thread but, I have a similar requirement where I COMPUTE a URL to call an external application (http://servername/some.aspx?parms=BlobField) with a BLOB or varcharMAX which will break the browser limit. Any ideas on how to get this function working for URL call? We're using 8202 here Thanks in advance!
Posts: 289 | Location: Houston,TX | Registered: June 11, 2004