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     [CLOSED] Format AHTML To Support Checkbox Selection.

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Format AHTML To Support Checkbox Selection.
 Login/Join
 
Master
posted
Greetings,

I have created a column of an Active Report that consists of a checkbox.

When the user selects a checkbox on page one of the report, and then goes to the next page, the selection from page 1 goes away.

How can I get an AHTML report to respect the setting of a checkbox?

Here is my code running against the sample GGPRODS database:

  
APP PREPENDPATH IBISAMP
-*
DEFINE FILE GGPRODS
 CHK_BOX/A100 = '<input type="checkbox" value="CBX' || PRODUCT_ID || '">';
END
-*
TABLE FILE GGPRODS
PRINT PRODUCT_ID
      PRODUCT_DESCRIPTION
      CHK_BOX
ON TABLE HOLD AS ACTREPT FORMAT AHTML
ON TABLE SET STYLE *
-* Set lines per page, and location of paging object.   
 TYPE=REPORT, 
      LINES-PER-PAGE=5,
	  OBJECT=STATUS-AREA, PAGE-LOCATION=BOTTOM, JUSTIFY=CENTER,$
ENDSTYLE
END
-RUN
-*
-HTMLFORM BEGIN
<html>
<head>
<title>Multi Checkboxes</title>
<script language=javascript>
function CheckCheckboxes(){
    var elLength = document.MyForm.elements.length;

    for (i=0; i<elLength; i++)
    {
        var type = MyForm.elements[i].type;
        var position = MyForm.elements[i].value.indexOf("CBX");
		var Product_Id = MyForm.elements[i].value.substr(3,4);
        if (type=="checkbox" && MyForm.elements[i].checked && position >= 0){
//          alert("Form element in position " + i + " is of type checkbox and is checked.");
//          alert(MyForm.elements[i].value);
            alert(Product_Id);
        }
        else if (type=="checkbox") {
//          alert("Form element in position " + i + " is of type checkbox and is not checked.");
        }
        else {
        }
    }
}
</script>
</head>
<body>
<form name="MyForm" method="get" action="/ibi_apps/WFServlet">
<!-- 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.ACTREPT;
-*
<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="CheckCheckboxes();">
<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


When my user selects Product Code B141, and goes to page two, and then clicks run, they do not see B141 appear in the alert, because the checkbox setting is no longer in effect.

Thank you for your consideration.

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
Virtuoso
posted Hide Post
Dave

The reason that the checkbox value reverts is that the data in an AHTML report is held in an array. When you change page the data is refreshed from the array.

Th only way you could keep the value is to change that array, and within AHTML this is almost a black art. There are no published functions for AHTML.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Master
posted Hide Post
Thank you Alan.

I've also heard back from IB, regarding a case I opened on this question. IB, shared with me that to control the checkboxes, we would be getting into the proprietary sections of the JavaScript, which are not customizable.

I move that this thread be marked [CLOSED].




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
  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] Format AHTML To Support Checkbox Selection.

Copyright © 1996-2020 Information Builders