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     [SOLVED] Setting browser properties when drill down from a graph

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Setting browser properties when drill down from a graph
 Login/Join
 
Gold member
posted
I have a dashboard like report created in HTML composer tool in DevStudio. The dashboard report has a pie graph with a drill drown feature. Clicking on a pie slice opens a popup browser with a tabular report. I need to control the properties of the browser window like hide the back button, url, menu items, size of the window etc. I have been searching the Focal Point for any applicable solutions.
The closest I could get is to add the code to .htm file to open a window with defined properties and refernce the window name as aTARGET in the graph file.

 <script>
my_window = window.open('', 'newwin',
 'resizable=yes, scrollbars=no, toolbars=no, location=no, directories=no, status=no, menubar=no, copyhistory=no');
</script>
 


In the graph file refer to the created window.
TYPE=DATA, COLUMN=N2,FOCEXEC=agasum(country=N1), TARGET='newwin', $


But this creates a blank browser up front before the drilling is done. is there a way to create the window when the user actually tries to drill.
Thanks for your help.

This message has been edited. Last edited by: Kerry,


7.6.9, XP
 
Posts: 60 | Location: Cary, NC | Registered: February 19, 2008Report This Post
Expert
posted Hide Post
CT,

Look into using a JAVASCRIPT call instead of the FOCEXEC call in your style syntax, and make the script the function that you call. You will need to include script within a file accessible by your resultant HTML file.

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, 2004Report This Post
<JG>
posted
Almost there.

The drilldown needs to call the javascript function which re-writes and submits the request

 
GRAPH FILE CAR
SUM DEALER_COST
ACROSS COUNTRY
ON GRAPH SET LOOKGRAPH BAR
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO ON
ON GRAPH SET GRID ON
ON GRAPH SET STYLE *
TYPE=REPORT, GRID=OFF, FONT='TIMES NEW ROMAN', SIZE=10, BACKCOLOR='NONE',
STYLE=NORMAL,$
TYPE=DATA, ACROSSCOLUMN=N1, JAVASCRIPT=runReport(COUNTRY),$
ENDSTYLE
ON GRAPH HOLD AS GRP1 FORMAT HTMTABLE
END
-HTMLFORM BEGIN
<html>
<SCRIPT LANGUAGE="JavaScript">
function runReport(COUNTRY) {
 var randomNumber=Math.floor(Math.random()*10000001);
 var uri = '/ibi_apps/WFServlet?IBIF_ex=carinst';
     uri += '%26COUNTRY=' + COUNTRY   ;
     uri += '%26RANDOM=' + randomNumber         ;
 window.open(unescape(uri),'','menubar=no,toolbar=no,status=no,location=no,width=200,height=200,resizable=no,scrollbars=no,left=200,top=200');
}
</script>
<body>
!IBI.FIL.GRP1;
</body>
</html>
-HTMLFORM END
 
 
Report This Post
Gold member
posted Hide Post
JG,
Thanks for your solution. I tried with my code and have a problem.

Below is my graph file. I am creating a computed field for the BY in order to sort the legend items. But I can not use it as a parameter for the java function since I can not use it for WHERE in my target report. The TARGET for my graph has three parameters, one of them is a NOPRINT field and other two are amper variables.
This works fine and brings up the standard browser.

-* File db-cabin.fex
-SET &name = 'CABINNAME';
-SET &lblText = 'Cabin';

TABLE FILE HDBMAIN
SUM
REQHOSTFLIGHTS AS 'HOSTFLIGHTS'
BY CONTRACTNAME
BY TOTAL HIGHEST 10 REQHOSTFLIGHTS NOPRINT
BY CABINNAME
ON TABLE SET ASNAMES ON
ON TABLE HOLD AS DBCABIN1
END

TABLE FILE DBCABIN1
SUM
     HOSTFLIGHTS
    COMPUTE C_HOSTFLIGHTS/A20 = FTOA(PCT.HOSTFLIGHTS, '(D15)', 'A20');
   COMPUTE C_SORT/A60 = C_HOSTFLIGHTS || '% - ' || MAX.CABINNAME;
BY CONTRACTNAME
BY TOTAL HIGHEST 10 HOSTFLIGHTS NOPRINT
BY CABINNAME
ON TABLE SET ASNAMES ON
ON TABLE HOLD AS DBCABIN2
END

GRAPH FILE DBCABIN2
SUM HOSTFLIGHTS
MAX.CABINNAME AS 'CABINNAME' NOPRINT
BY HIGHEST C_SORT
ON GRAPH PCHOLD FORMAT PNG

ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET HAXIS 490
ON GRAPH SET VAXIS 350
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH PIESINGL
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET GRAPHSTYLE *
setTemplateFile("/images/tdg/template/PrismSouthWestern.txt");
setReportParsingErrors(false);
setSelectionEnableMove(false);
setPieFeelerTextDisplay(0);
setReverseSeries(0);
-*setLegendPosition(3);
setLegendAutomatic(true);
setLegendPosition(3);
setDisplay(getPieLabel(),false);
setPlace(false);
setPlaceResize(getPieSliceLabel(),0);
setFontName(getPieSliceLabel(),"Arial");
setFontName(getLegendText(),"Arial");
setFontName(getSubtitle(),"Arial");
setTextString(getTitle(),"");
setTextString(getSubtitle(),"Cabin");
setDisplay(getSubtitle(),true);
setFontSizeAbsolute(getSubtitle(),true);
setFontSizeInPoints(getSubtitle(),12);
setFontStyle(getSubtitle(),2);
setPlaceResize(getLegendText(),0);
setFontSizeAbsolute(getLegendText(),true);
setFontSizeInPoints(getLegendText(),6);
setFontSizeAbsolute(getPieSliceLabel(),true);
setFontSizeInPoints(getPieSliceLabel(),6);
setFillColor(getChartBackground(),new Color(255,255,255));
setTransparentBorderColor(getChartBackground(),true);
setPieDepth(0);
setPieTilt(0);
setOtherPieLabelDisplay(0);
setPieLabelDisplay(0);
setTextFormatPreset(getPieSliceLabel(),28);
setFontSizeAbsolute(getLegendText(), true);
setFontSizeInPoints(getLegendText(), 8);
setTransparentBorderColor(getSeries(0),true);
setTransparentBorderColor(getSeries(1),true);
setTransparentBorderColor(getSeries(2),true);
setTransparentBorderColor(getSeries(3),true);
setTransparentBorderColor(getSeries(4),true);
setLegendPosition(-1);
setLegendAutomatic(false);
setRect(getLegendArea(),new Rectangle(-16000.0,-1000.0,3000.0,8000.0));
setPlace(true);
ENDSTYLE
ON GRAPH SET STYLE *
TYPE=DATA, COLUMN=N2, FOCEXEC=db-contract-detail(val = N3 name = '&name.EVAL' lblText = '&lblText.EVAL'), TARGET='report1', $
ENDSTYLE
END
-RUN

  


With the Javascript function to customize the browser, I made the amper variables as DEFINE fields and included in TABLE FILE as NOPRINT fields. The graph part comes up and when I mouse over the slices I see JAVASCRIPT:runReport('','',''). For some reason it's not getting the parameter values. Is it because they are NOPRINT fields? But I don't know I have any other way. As you can tell, I am not very familiar with Java script syntax.

 
-* File db-cabin.fex
-SET &name = 'CABINNAME';
-SET &lblText = 'Cabin';

TABLE FILE HDBMAIN
SUM
REQHOSTFLIGHTS AS 'HOSTFLIGHTS'
  BY CONTRACTNAME
BY TOTAL HIGHEST 10 REQHOSTFLIGHTS NOPRINT
BY CABINNAME
ON TABLE SET ASNAMES ON
ON TABLE HOLD AS DBCABIN1
END

DEFINE FILE DBCABIN1
name/A10 = 'CABINNAME';
lblText/A10 = 'Cabin';
END

TABLE FILE DBCABIN1
SUM
     HOSTFLIGHTS
    COMPUTE C_HOSTFLIGHTS/A20 = FTOA(PCT.HOSTFLIGHTS, '(D15)', 'A20');
   COMPUTE C_SORT/A60 = C_HOSTFLIGHTS || '% - ' || MAX.CABINNAME;
MAX.name AS 'name' 
MAX.lblText AS 'lblText' 
BY CONTRACTNAME
BY TOTAL HIGHEST 10 HOSTFLIGHTS NOPRINT
BY CABINNAME
ON TABLE SET ASNAMES ON
ON TABLE HOLD AS DBCABIN2
END

GRAPH FILE DBCABIN2
SUM HOSTFLIGHTS
BY HIGHEST C_SORT
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET HAXIS 490
ON GRAPH SET VAXIS 350
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH PIESINGL
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET GRAPHSTYLE *
setTemplateFile("/images/tdg/template/PrismSouthWestern.txt");
setReportParsingErrors(false);
setSelectionEnableMove(false);
setPieFeelerTextDisplay(0);
setReverseSeries(0);
-*setLegendPosition(3);
setLegendAutomatic(true);
setLegendPosition(3);
setDisplay(getPieLabel(),false);
setPlace(false);
setPlaceResize(getPieSliceLabel(),0);
setFontName(getPieSliceLabel(),"Arial");
setFontName(getLegendText(),"Arial");
setFontName(getSubtitle(),"Arial");
setTextString(getTitle(),"");
setTextString(getSubtitle(),"Cabin");
setDisplay(getSubtitle(),true);
setFontSizeAbsolute(getSubtitle(),true);
setFontSizeInPoints(getSubtitle(),12);
setFontStyle(getSubtitle(),2);
setPlaceResize(getLegendText(),0);
setFontSizeAbsolute(getLegendText(),true);
setFontSizeInPoints(getLegendText(),6);
setFontSizeAbsolute(getPieSliceLabel(),true);
setFontSizeInPoints(getPieSliceLabel(),6);
setFillColor(getChartBackground(),new Color(255,255,255));
setTransparentBorderColor(getChartBackground(),true);
setPieDepth(0);
setPieTilt(0);
setOtherPieLabelDisplay(0);
setPieLabelDisplay(0);
setTextFormatPreset(getPieSliceLabel(),28);
setFontSizeAbsolute(getLegendText(), true);
setFontSizeInPoints(getLegendText(), 8);
setTransparentBorderColor(getSeries(0),true);
setTransparentBorderColor(getSeries(1),true);
setTransparentBorderColor(getSeries(2),true);
setTransparentBorderColor(getSeries(3),true);
setTransparentBorderColor(getSeries(4),true);
setLegendPosition(-1);
setLegendAutomatic(false);
setRect(getLegendArea(),new Rectangle(-16000.0,-1000.0,3000.0,8000.0));
setPlace(true);
ENDSTYLE
ON GRAPH SET STYLE *
TYPE=DATA, COLUMN=N2, JAVASCRIPT=runReport(CABINNAME name lblText), $
ENDSTYLE
ON GRAPH HOLD AS GRP1 FORMAT HTMTABLE
END
-HTMLFORM BEGIN
<html>
<SCRIPT LANGUAGE="JavaScript">
function runReport(COUNTRY) {
 var uri = '/ibi_apps/WFServlet?IBIF_ex=db-contract-detail';
  uri += '%26CABINNAME=' + CABINNAME   ;
     uri += '%26name=' + name   ;
     uri += '%26lblText=' + lblText         ;
 window.open(unescape(uri),'','menubar=no,toolbar=no,status=no,location=no,width=200,height=200,resizable=yes,scrollbars=no,left=200,top=200, titlebar=no);
}
</script>
<body>
!IBI.FIL.GRP1;
</body>
</html>
-HTMLFORM END

Again, thanks a lot for your help.


7.6.9, XP
 
Posts: 60 | Location: Cary, NC | Registered: February 19, 2008Report This Post
Gold member
posted Hide Post
I got it working. I was just making the java function complex by adding amper variables .
-HTMLFORM BEGIN
<html>
<SCRIPT LANGUAGE="JavaScript">
function runReport(N3) {
 var uri = '/ibi_apps/WFServlet?IBIF_ex=dbcontractdetail';
  uri += '%26val=' + N3   ;
     uri += '%26name=CABINNAME ';
     uri += '%26lblText=Cabin ' ;
 window.open(unescape(uri),'','menubar=no,toolbar=no,status=no,location=no,width=200,height=200,resizable=yes,scrollbars=no,left=200,top=200, titlebar=no, fullscreen=no');
}
</script>
<body>
!IBI.FIL.GRP1;
</body>
</html>
-HTMLFORM END
  


I just have one more question. Is it possible to not show the query string in the title bar and instead show a string like 'Top Markets'. I think I can get rid of the title bar itself by making it fullscreen, but that may not be the solution.
Thanks for your help!


7.6.9, XP
 
Posts: 60 | Location: Cary, NC | Registered: February 19, 2008Report 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     [SOLVED] Setting browser properties when drill down from a graph

Copyright © 1996-2020 Information Builders