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.
The problem is that "multiple rows" indicates a report, but "checkbox" indicates some sort of form. How are you going to get each row of a report to appear with a checkbox in a form. And, because WF doesn't provide a way for multi-selecting "rows" and performing a drill-down, you've got a tough (if not impossible) row to hoe with this one - even with Javascript.
I would go with some form of multi-drill functionality where multiple reports/parm sets can be run from a single row instead of one report being run for multiple rows. I know that's not your specific requirement, but it may be some sort of answer to a tough question.
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
I will be creating a HTML report with a checkbox in front of the row. I was thinking of somehow counting the rows (i) and using the values required from the rows that were checked.
APP PREPENDPATH IBISAMP
TABLE FILE CAR
PRINT COMPUTE CTRY_CNT/P2 = IF COUNTRY EQ LAST COUNTRY THEN LAST CTRY_CNT ELSE CTRY_CNT + 1; NOPRINT
COMPUTE CTRY_INP/A100 = '<input type="checkbox" id="CTRY'||EDIT(CTRY_CNT)||'" name="CTRY" value="'
||COUNTRY||'" onClick="check_click(''CTRY'||EDIT(CTRY_CNT)||''');">'; AS ''
BY COUNTRY AS ''
ON TABLE HOLD AS MYHTML FORMAT HTMTABLE
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
GRID=OFF, SIZE=9, $
TYPE=DATA, COLUMN=COUNTRY, CLASS=ctry_style, $
TYPE=DATA, COLUMN=CTRY_INP, CLASS=chck_style, $
ENDSTYLE
END
-RUN
-HTMLFORM BEGIN
<html>
<head>
<title>Multi Checkboxes</title>
<style>
.ctry_style {width:200px;}
.chck_style {width:25px;}
</style>
<script language=javascript>
function check_click(ctry) {
// Perform anything you need within this function
if (document.getElementById(ctry).checked) {
// control is checked
alert("You have selected "+document.getElementById(ctry).value);
} else {
// control is unchecked
}
// alert("You have selected "+document.getElementById(ctry).value);
}
function select_all() {
SelAll = document.getElementById("SELALL");
Countries = document.getElementsByName("CTRY");
for (i=0;i<Countries.length;i++) {
Country = Countries[i];
Country.checked = SelAll.checked;
}
}
function submit_form() {
// Here you can validate the form. Such as to ensure at least one country is clicked etc.
Countries = document.getElementsByName("CTRY");
var ctry_cnt = 0;
for (i=0;i<Countries.length;i++) {
Country = Countries[i];
ctry_cnt += Country.checked;
}
if (ctry_cnt > 0) {
document.form.target = "_blank";
generate_random();
document.form.submit();
} else {
alert("You must select at least one Country");
}
}
function generate_random() {
var Random_No = Math.floor(Math.random()*100000);
Rand = document.getElementById("IBIMR_random");
Rand.value = Random_No;
}
</script>
</head>
<body>
<form name="form" method="get" action="/ibi_apps/WFServlet">
<input type=hidden name="IBIF_ex" id="IBIF_ex" value="fexname.fex">
<input type=hidden name="IBIAPP_app" id="IBIAPP_app" value="appfolder">
<!-- MRE / BID Version variables
<input type=hidden name="IBIMR_action" value="MR_RUN_FEX">
<input type=hidden name="IBIMR_sub_action" value="MR_STD_REPORT">
<input type=hidden name="IBIMR_domain" value="xxxxxxxx/xxxxxxxx.htm">
<input type=hidden name="IBIMR_folder" value="#xxxxxxxxxxxx">
<input type=hidden name="IBIMR_fex" value="app/fexname.fex">
-->
<!-- Common variables -->
<!-- This turns off amper autoprompting -->
<input type=hidden name="WF_DESCRIBE" id="WF_DESCRIBE" value="OFF">
<!-- this should avoid caching problems -->
<input type=hidden name="IBIMR_random" id="IBIMR_random" value=0>
!IBI.FIL.MYHTML;
<table cellpadding=1 class='x1'>
<tr>
<td class='ctry_style' style="background-color:#ccccff;">
Select All</td>
<td class='chck_style'>
<input type="checkbox" id="SELALL" value="ALL" onClick="select_all();"></td>
</tr>
<tr>
</table>
<input id=btn_submit style="position:relative; top:10px; left:70px; width:38px; height:22px;
background-color:#f0f5ff; background-image:url(/ibi_html/javaassist/ibi/html/describe/run16.gif);"
type="button" value=" " onClick="submit_form();">
<input id=btn_reset style="position:relative; top:10px; left:80px; width:38px; height:22px;
background-color:#f0f5ff; background-image:url(/ibi_html/javaassist/ibi/html/describe/reset.gif);"
type="reset" value=" ">
</form>
</body>
</html>
-HTMLFORM END
TThis message has been edited. Last edited by: Tony A,
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, 2004