Focal Point
Drill-Down link to multiple frames

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1321009331

September 27, 2005, 08:11 PM
frickst
Drill-Down link to multiple frames
Is there a way to have one drill-down link run two separate focexecs, each within it's own IFRAME? Below is a sample of the code that I intially tried. Obviously, this method did not work, but this should provide an idea of what I am trying to do.


TYPE=DATA, COLUMN=ACCOUNT_NO,
FOCEXEC=BALANCE1(ACCOUNT=ACCOUNT_NO),
TARGET=iframe1, $
TYPE=DATA, COLUMN=ACCOUNT_NO
FOCEXEC=TRANSH1(ACCOUNT=ACCOUNT_NO),
TARGET=iframe2, $

I tried a few different methods to to to get this to work, but was unsucessful. From what I can tell, the target for a drill-down must be controlled from the parent report, therefore only one target can be specified per link.

Does anyone have any ideas on how I could get this to work?
September 27, 2005, 08:30 PM
Francis Mariani
You should run one focexec that executes BALANCE1 and TRANSH1 and then builds an HTMLFORM with two iframes that contains the results.
September 28, 2005, 04:47 AM
susannah
frikst, you've got 2 things going on, it seems.
first, you've got 2 drilldowns from one element...which is fine.. but you've got to use the multi-drill feature.
TYPE=DATA,COLUMN=ACCOUNT_NO,
DRILLMENUITEM='first choice is transh1',focexec=TRANSH1(ACCOUNT=ACCOUNT_NO),
DRILLMENUITEM='or second choice balance',
focexec=balance1(ACCOUNT=ACCOUNT_NO),
$
..
then the second issue is different targets.
I've gotten different targets to work, but only with single drilldowns, not multiple choice, and from different elements. If my source fex result appears in, say, a banner frame, when i load the frameset i have automatically run a fex..then if user clicks one thing in that banner, say CAR, then the drilldown posts to "leftmainframe" and if user clicks , say, MODEL, then the dd posts to the "rightmainframe".
That's doable, but your situation is more delightfully complex. I've never done multiple targets from a multidrill. You can write your own drilldown... you do it by defining a variable that is a big text string, containing the html code for a drilldown, and embedding the variable value. So when it prints out in your report, lo and behold its a link. You can specify target that way, as well as stuff like naming a new window, and controlling its size and location. If that interests you, holler back, and we'll help you with it.
Francis's method , running one fex, from one single drilldown, with 2 output tables made by that single fex, and them bringing back both output tables...
TABLE FILE CAR...
ON TABLE HOLD AS MYTAB1 FORMAT HTMTABLE
END
TABLE FILE CAR...
ON TABLE HOLD AS MYTAB2 FORMAT HTMTABLE
END
-RUN
-HTMLFORM BEGIN
!IBI.FIL.MYTAB1;
!IBI.FIL.MYTAB2;
-HTMLFORM END
this is the simplest form of the output containing both tables. As Francis says, you can if you want, surround these two output tables with all sorts of html code...make them 2 cells in a single table row, make them contents of two iframes...whatever...
September 28, 2005, 07:52 AM
Tony A
Frickst,
Not sure if this is what you mean but here's a working example ....

In your top fex you might have TYPE=DATA, COLUMN=whatever,
FOCEXEC=multiple_frame_report(Country1='ENGLAND' Country2='FRANCE'), TARGET='_blank', $

then your multiple_frame_report.fex contains -

-* File multiple_frame_report.fex
-DEFAULT &Country1 = 'ENGLAND' ;
-DEFAULT &Country2 = 'FRANCE' ;

-SET &URL_STR1 = 'javascript:this.location.href='||'''/cgi-bin/ibi_cgi/webapi.dll?IBIF_ex=multiple_frame_report1&'||'Country='||&Country1.EVAL||'&'||'RND='' + Math.floor((Math.random()*100000)) ;'
-SET &URL_STR2 = 'javascript:this.location.href='||'''/cgi-bin/ibi_cgi/webapi.dll?IBIF_ex=multiple_frame_report1&'||'Country='||&Country2.EVAL||'&'||'RND='' + Math.floor((Math.random()*100000)) ;';

-HTMLFORM multiple_frame_report

Which calls the HTML file -
<html> 
<!-- This HTML provides various IFRAME sections each with an execution string to a particular focexec. -->
<!-- This provides the ability to display graphs side by side within the HTML page in a manner that is not easy (if at all possible!) within WebFOCUS. -->
<head><title>Multiple Frame Report</title></head>
<body>
<iframe id="report1" src=!IBI.AMP.URL_STR1; border="0" frameborder="0" width="1535" height="340" style="position:absolute;left:0px;top:0px"></iframe>
<iframe id="report2" src=!IBI.AMP.URL_STR2; border="0" frameborder="0" width="1535" height="340" style="position:absolute;left:0px;top:340px"></iframe>
</body>
</html>

which uses the amper variable strings created in multiple_frame_report to run a single fex twice but in different iframes.
The fex contains
-* File multiple_frame_report1.fex
-DEFAULT &Country = 'ENGLAND' ;
TABLE FILE CAR
  SUM DCOST    
      RCOST
   BY COUNTRY
   BY CAR
   BY MODEL
WHERE COUNTRY EQ '&Country';
END
-RUN

Edited because the content had been "Mabelised" Wink

This 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