Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Javascript function on first BY-field in report with EXPANDBYROWTREE
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Javascript function on first BY-field in report with EXPANDBYROWTREE
 Login/Join
 
Member
posted
Hi guys,

I have a report thats expandable and has the expandbyrowtree option to get the nice accordion structure of the report. However it seems as if I can't place a drilldown link (javascript, navigateToPage) on the first column (i.e. the first BY field).

Example:

SET JSURLS = '/ibi_apps/tools/portalcanvas/iframeinterface.js'

TABLE FILE BASEAPP/CAR
SUM RETAIL_COST
BY COUNTRY
BY CAR
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET CACHELINES 100
ON TABLE SET GRWIDTH 1
ON TABLE SET BYDISPLAY OFF
ON TABLE SET AUTOFIT OFF
ON TABLE SET EXPANDABLE ON
ON TABLE SET EXPANDBYROWTREE 1
ON TABLE SET DROPBLNKLINE ON
ON TABLE SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Flat.sty,$
TYPE = DATA, COLUMN=CAR, JAVASCRIPT=navigateToPage('Page' 'Panel' 'Param' param), $
TYPE = DATA, COLUMN=COUNTRY, JAVASCRIPT=navigateToPage('Page' 'Panel' 'Param' param), $
ENDSTYLE
END


On CAR which is my second BY-field it shows the link perfectly. On COUNTRY it doesn't. I also tried altering the last STYLE-line to this:

TYPE = SUBTOTAL, COLUMN=COUNTRY, JAVASCRIPT=navigateToPage('Page' 'Panel' 'Param' param), $

--> doesn't work either

or this:

TYPE = SUBTOTAL, BY=COUNTRY, JAVASCRIPT=navigateToPage('Page' 'Panel' 'Param' param), $

--> does work, but changes every column of the whole SUBTOTAL-line to a link and I only want it on the first column.

TYPE = SUBTOTAL, BY=COUNTRY, COLUMN=COUNTRY, JAVASCRIPT=navigateToPage('Page' 'Panel' 'Param' param), $

--> doesn't work. It seems as if I just can't adress the first column of this report. I also already tried adressing the column as B1, N1, E01, ... nothing works.

Can anyone help me? :/

This message has been edited. Last edited by: JForFun,
 
Posts: 12 | Registered: June 24, 2019Reply With QuoteReport This Post
Virtuoso
posted Hide Post
JforFun

My strength is not javascript but I found this doc that starting on page 306 may help you. https://webfocusinfocenter.inf...pdfs2/wfbiportal.pdf

Not sure what release you are on, this is for version 8.2.02.

I used the code you provided and I do see a link on the COUNTRY field it just doesn't do anything. Based on what I read in the doc you have to specify the portal page name and panel name and parameter names in the call. Your example just say page, panel, param


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 1634 | Location: Customer Support | Registered: April 12, 2005Reply With QuoteReport This Post
Member
posted Hide Post
Of course I know that I have to change Page and param to the ones used in the portal but this doesnt matter since I dont even get the empty link shown on the report.

Which version did you try? I only get the link with the

 TYPE = SUBTOTAL, BY=COUNTRY, JAVASCRIPT=navigateToPage('Page' 'Panel' 'Param' param), $ 


line but that turns the whole row into a link while I only want it on country.

Version is 8.2.04 btw.
 
Posts: 12 | Registered: June 24, 2019Reply With QuoteReport This Post
Expert
posted Hide Post
I guess that you are hand coding this?

If you are, then try adding OBJECT=TAG, to your line. Just tried this in 8.2.04 and it works OK.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.06 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5610 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Expert
posted Hide Post
BTW, the syntax is SET JSURL not JSURLS.

Whilst this seems to work in 8.2.04 you should stick to documented syntax in case of code tightening.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.06 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5610 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Member
posted Hide Post
THX, Tony, that worked beautifully. Also thank you for the hint on JSURL, I will correct that.
 
Posts: 12 | Registered: June 24, 2019Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Javascript function on first BY-field in report with EXPANDBYROWTREE

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.