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 have a report which displays the following 4 columns.
Dept.No Dept.Name No.of Emp Tot.Sal
The Dept.No column has a href link.
The requirement is, on click of Dept no, report should list all the employees details for the selected department on the same page.
For example, if user clicks on First record’s Dept no, report should make space between first and second record and display the employee details for the selected department.
You could use a combination of javascript and HTML to achieve this. This code will require tweaking to provide the shiny end product but it gives you a starting point -
SET PAGE-NUM = NOPAGE
DEFINE FILE GGSALES
CHILDDIV/A300 = '<a href="javascript:ShowChild('''||REGION||''');">'||REGION||
'</a><div id="'||REGION||'" style="visibility: hidden;"></div>';
END
TABLE FILE GGSALES
SUM DOLLARS
BY CHILDDIV AS 'Region'
ON TABLE HOLD AS REGIONS FORMAT HTMTABLE
END
-RUN
-HTMLFORM BEGIN
<html>
<head>
<title>Parent and Child</title>
</head>
<script language=javascript>
function ShowChild(region) {
//alert(region);
this.displayElement=document.getElementById(region);
if (this.displayElement.style.visibility == "visible") {
this.displayElement.innerHTML = '';
this.displayElement.style.visibility = "hidden";
} else {
this.displayElement.innerHTML = '<iframe src="/cgi-bin/ibi_cgi/ibiweb.exe?'+
'IBIAPP_app=baseapp&|IBIF_ex=rgnlist&|Region='+
region+'"></iframe>';
this.displayElement.style.visibility = "visible";
}
}
</script>
<body>
!IBI.FIL.REGIONS;
</body>
</html>
-HTMLFORM END
You will require a fex called rgnlist to make this work, something like -
-DEFAULT &Region='FOC_NONE'
SET PAGE-NUM = NOPAGE
TABLE FILE GGSALES
SUM DOLLARS
BY ST
WHERE REGION EQ '&Region'
END
Enjoy .........
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
I think its much better to generate the whole thing and you do not have to worry about those awful scroll bars.
The ACCORDIAN reports are the active HTML reports and as I said not FOC.
FILEDEF DISPLAYFILE DISK DISPFILE.HTM -RUN DEFINE FILE CAR BLANK/A1=' '; COUNTRYLABEL/A180='
' || '
' || COUNTRY | '
'; CARDISPLAY/A180='
' || CAR || '
'; TDBODYH/A180=''; TDBODYF/A180='
'; END
TABLE FILE CAR PRINT CARDISPLAY AS '' BY COUNTRYLABEL NOPRINT ON COUNTRYLABEL SUBHEAD ""ON COUNTRYLABEL SUBFOOT "ON TABLE HOLD AS DISPLAYFILE FORMAT WP ON TABLE SET PAGE NOPAGE ON TABLE SET PANEL 300 ON TABLE SET WIDTH 180 END -RUN -HTMLFORM BEGIN
<script> function toggle(Country) { var el; if (document.getElementById && (el = document.getElementById(Country))) { if(el.style.display == 'none' ){ el.style.display = ''; }else{ el.style.display = 'none'; } } }
!IBI.FIL.DISPFILE;
-HTMLFORM ENDThis message has been edited. Last edited by: <Mabel>,
Nice application! I agree the scroll bars are annoying but it was a quick method!! I prefer your method, as you imply, it doesn't require a revisit to the reporting server everytime you open the iframe.
Antony,
Anything is possible, you just have to get your head around the requirements!
Try creating the HTML and Javascript first and then gear it into the WebFOCUS.
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
The main issue providing you stay within the WebFocus limitations for heading/subhead/subfoot text which used to be 32k (not sure what it is now) Is that you cannot nest tbody tags which means that you have to look at more extensive javascript and use the getELementsByTagName method.
This example goes down an extra level and can be expanded quite easily (I've included Tonys mouseover) I've also included indentation of the drill items.
The only issue is that when you close a drilldown you must close the children first or they are left hanging. If anyone has a solution I'm open
FILEDEF DISPLAYFILE DISK DISPFILE.HTM -RUN DEFINE FILE CAR COUNTRYLABEL/A256='
' || '
' || COUNTRY | '
'; CARLABEL/A256 ='
' || '
' || CAR | '
'; MODDISPLAY/A256='
' || MODEL || '
'; END
TABLE FILE CAR PRINT MODDISPLAY AS '' BY COUNTRYLABEL NOPRINT ON COUNTRYLABEL SUBHEAD "BY CARLABEL NOPRINT ON CARLABEL SUBHEAD "ON TABLE HOLD AS DISPLAYFILE FORMAT WP ON TABLE SET PAGE NOPAGE ON TABLE SET PANEL 300 ON TABLE SET WIDTH 180 END -RUN -HTMLFORM BEGIN
<script> function toggle( ToggleWhat ) { var divs = document.getElementsByTagName('tr'); for (var i = 0; i < divs.length; i++) { var element = divs[i]; if( element.className.indexOf( ToggleWhat ) != -1 ) { if(element.style.display == 'none' ){ element.style.display = ''; }else{ element.style.display = 'none'; } } } }
!IBI.FIL.DISPFILE;
-HTMLFORM ENDThis message has been edited. Last edited by: <Mabel>,