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.
I'm creating an HTML page by using a fex file which has drill down capability. I have also created an edit box on the HTML page which should capture the country name from the fex file when the user clicks on the country name for drill down. How can I set the edit box so that it captures the name of the country on click? Also, I want instead of opening up drill down report in new tab on the HTML page, the current report should get replaced with the drill down report. Is it possible?
Below is the code for the fex files:
DEFINE FILE CAR AA/D12.2=IF (CAR.BODY.SEATS LT 2) OR (CAR.BODY.DEALER_COST LT 20000) THEN 0 ELSE CAR.BODY.RETAIL_COST; END TABLE FILE CAR SUM COMPUTE Profit/D2.1% = CAR.BODY.DEALER_COST - CAR.BODY.RETAIL_COST; CAR.BODY.SALES CAR.COUNTRY NOPRINT BY LOWEST CAR.ORIGIN.COUNTRY BY LOWEST CAR.CARREC.MODEL
ON CAR.ORIGIN.COUNTRY RECOMPUTE MULTILINES
ON CAR.CARREC.MODEL RECOMPUTE MULTILINES -*WHERE COUNTRY NE 'ENGLAND'; ON TABLE SET PAGE-NUM OFF ON TABLE COLUMN-TOTAL AS 'TOTAL' ON TABLE PCHOLD FORMAT HTML ON TABLE SET HTMLEMBEDIMG ON ON TABLE SET STYLE * $ TYPE=REPORT, BORDER-TOP=OFF, BORDER-BOTTOM=HEAVY, BORDER-LEFT=OFF, BORDER-RIGHT=OFF, BORDER-BOTTOM-COLOR='GREEN', RIGHTGAP=0.180556, LEFTGAP=0.055556, TOPGAP=0.055556, BOTTOMGAP=0.055556, $ TYPE= DATA, COLUMN = N1, -*DRILLMENUITEM='Ascending', TARGET='_blank', FOCEXEC=IBFS:/WFC/Repository/Reports/CAR_TEST.fex ( COUNTRY =COUNTRY\ ) ,
COLOR = 'BLUE', $
ENDSTYLE END
CAR_TEST.fex
-DEFAULT &COUNTRY = 'ENGLAND'; DEFINE FILE CAR ADD Check/D12.2=CAR.BODY.SEATS * CAR.SPECS.LENGTH; END DEFINE FILE CAR DefineTest/D12.2=CAR.SPECS.LENGTH * CAR.SPECS.WIDTH; END
TABLE FILE CAR PRINT CAR.BODY.DEALER_COST CAR.SPECS.DefineTest CAR.COMP.CAR CAR.CARREC.MODEL CAR.BODY.BODYTYPE CAR.BODY.SEATS CAR.SPECS.LENGTH CAR.WARANT.WARRANTY CAR.COUNTRY WHERE COUNTRY EQ '&COUNTRY'; ON TABLE SET PAGE-NUM NOLEAD ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT HTML ON TABLE SET HTMLEMBEDIMG ON ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * $ TYPE=REPORT, BORDER-TOP=MEDIUM, BORDER-BOTTOM=OFF, BORDER-LEFT=OFF, BORDER-RIGHT=OFF, BORDER-TOP-STYLE=DOUBLE, RIGHTGAP=0.180556, LEFTGAP=0.055556, TOPGAP=0.055556, BOTTOMGAP=0.055556, $ TYPE=DATA, COLUMN=N4, COLOR='RED', WHEN=N3 EQ 'CAR', $ TYPE=DATA, COLUMN=N5, COLOR='GREEN', WHEN=N3 EQ 'MODEL', $ TYPE=DATA, COLUMN=N6, COLOR='PINK', WHEN=N3 EQ 'BODYTYPE', $ TYPE=TITLE, BORDER-TOP=LIGHT, BORDER-LEFT=LIGHT, STYLE=BOLD, TOPGAP=0.055556, BOTTOMGAP=0.055556, $ ENDSTYLE END
Thank you in advance, MMThis message has been edited. Last edited by: MeM,
Is there any way, I can get the value in the edit box or I can default the name of the country in the drop down list?
Which drop down list ?
It doesn't appear anywhere in your first post that you have a DL somewhere. Without the whole situation it's difficult to help. Also it could be possible that you're taking it from the wrong way.
As far as I can understand, you probably have an HTML page that contain a report which is "drillable", you want that drillable report to return the drilled value (country) to a dropdown list on the HTML to have that country as the default value -- not possible.
See it as a parent-child relationship where the parent is the HTML and the child the report : the parent talks to the child but not the opposite. It's like in the real life : parents never listen to children, parents gives command to children, not the opposite :-)This message has been edited. Last edited by: MartinY,
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013
I just accomplished using drill to populate an HTML form a couple weeks ago.
I have three pieces to my puzzle. 1) Initial report with drill (report1.fex) 2) FEX with an include to call HTML (CallHTML.fex) 3) HTML form page (myform.htm)
On the report with the drill be sure to send variable of the data you want sent:
Then the key piece in the HTML is to use a little JavaScript along with the IBI variable name passed. On your drop-down choose to add an OnAfterLoad event like the following to automatically select what was sent:
//Begin function dropdownlist1_onafterload
function dropdownlist1_onafterload(ctrl) {
var ddl = document.getElementById('dropdownlist1');
for (var i=0; i<ddl.length; i++){
if (ddl.options[i].value == "!IBI.AMP.THEEDITBOXVALUETOSEND;"){
ddl.selectedIndex = i;
}
}
}
//End function ddlOfficerType_onafterload
For me I pre-loaded my DDL and I look to see if the data coming from the FEX (!IBI.AMP.THEEDITBOXVALUETOSEND exists in that list and then I select it.
JC WebFOCUS Dev Studio / App Studio 8.2.01 Windows 7
Originally posted by jcannavo: I just accomplished using drill to populate an HTML form a couple weeks ago.
I have three pieces to my puzzle. 1) Initial report with drill (report1.fex) 2) FEX with an include to call HTML (CallHTML.fex) 3) HTML form page (myform.htm)
On the report with the drill be sure to send variable of the data you want sent:
Then the key piece in the HTML is to use a little JavaScript along with the IBI variable name passed. On your drop-down choose to add an OnAfterLoad event like the following to automatically select what was sent:
//Begin function dropdownlist1_onafterload
function dropdownlist1_onafterload(ctrl) {
var ddl = document.getElementById('dropdownlist1');
for (var i=0; i<ddl.length; i++){
if (ddl.options[i].value == "!IBI.AMP.THEEDITBOXVALUETOSEND;"){
ddl.selectedIndex = i;
}
}
}
//End function ddlOfficerType_onafterload
For me I pre-loaded my DDL and I look to see if the data coming from the FEX (!IBI.AMP.THEEDITBOXVALUETOSEND exists in that list and then I select it.
Technically jcannova solution is not calling an HTML, he's calling a fex that executes an HTML form, which could be ok it it's the need.
But, except if I haven't properly understand MeM request, jcannova solution opens a new HTML and does not return the selected drilled value to it's parent HTML. Meaning that there is a HTML with a drillable report, MeM drill on report where the drilled one will be displayed in the same place holder than the parent report on the HTML page and then MeM wants to display on the same HTML the clicked value; which as far as I can know, it's not possible since "a child is not talking to its parent".
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013
I was thinking, if I get the value from the drill down report in edit box on the HTML page on click then I can chain the edit box to the drop down list to default the value of the country clicked in the drop down list. That's why I just mentioned about edit box only not about drill down list in my original post.
if I get the value from the drill down report in edit box on the HTML page on click
That is the point : you can't pass a clicked value from a child (the drillable report which is part of the HTML page) to the parent (the HTML page itself).
I may be wrong and it's not the first time that kind of request is raised on the forum. But as far as I can remember, it's not possible to perform such a thing except if you can reissue the HTML page with new parameters. Which, I think, is going to be a pain.
MeM, can you explain more what is your goal by doing that kind of thing ? Maybe you're looking at it from the wrong end. If we can have a complete description of your need, we can give you a better solution.
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013
On my HTML page, I have 11 different fex files and one of them is drill down report. I also have a dropdown list for country. I want when the user click on any country name on the drill down report than the country drop down list should default to the name of the country clicked on the drill down report so that once the drop down list defaults to that particular country all other fex files should show the results according to that country.
you can't pass a clicked value from a child (the drillable report which is part of the HTML page) to the parent (the HTML page itself)
Did this years ago using a modal dialog o contain the "child" report with a link to pass back a value to the "parent".
Would need to dig out the code if I still have it, but it can be done.
However, unless you are really confident in playing with modal dialogues and javascript (jquery wasn't available when I did this!) then I would suggest you look for an alternative method that you can maintain yourself.
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, 2004
But, except if I haven't properly understand MeM request, jcannavo solution opens a new HTML and does not return the selected drilled value to it's parent HTML. Meaning that there is a HTML with a drillable report, MeM drill on report where the drilled one will be displayed in the same place holder than the parent report on the HTML page and then MeM wants to display on the same HTML the clicked value; which as far as I can know, it's not possible since "a child is not talking to its parent".
Correct, my solution doesn't go backwards with the passed value. Sorry, I missed that point. Still may be something of help especially if Tony can find his solution.
JC WebFOCUS Dev Studio / App Studio 8.2.01 Windows 7