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. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at myibi@ibi.com and provide your corporate email address, company, and name.


Connect to myibi
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SHARING] Is there an Easy way to Drilldown to Application .fex from MRE launched fex

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SHARING] Is there an Easy way to Drilldown to Application .fex from MRE launched fex
 Login/Join
 
Master
posted
There are 3 methods of launching a fex from another fex.

1. Include
2. EX
3. Drilldown via stylesheet

In 1 & 2 there is a distinction you can make to choose MRE or application version of fex to run.

1. -INCLUDE R1152D2 is MRE version or
-MRENOEDIT BEGIN
-INCLUDE R1152D2
-MRENOEDIT END is the Application version.

2. EX is MRE version
EXEC is Application version

However with 3 Drilldown there is no distinction.

The same drilldown produces 2 different URL's

TYPE=DATA,COLUMN=N9,FOCEXEC=R1152D2.fex(TOD='&TOD' WFFMT='&WFFMT' YEAR='&FINYEAR' PERIOD &OPERATOR2 '&FINPERIOD'  REPTYPE='NAVY' CATEGORY=BKG_NAVY_CATEG ORG_CODE=BKG_NAVY_ORG_CODE PRODUCTIVITY=NEW_ACTIVITY_PROD_FULL SUB_PROJECT_ID='ADMIN' CLASS=BKG_NAVY_ACTIVITY_CLASS) , $


1. BID/Mre URL (htp deliberate to stop tags being entered by forum)

htp://chaos/ibi_apps/WFServlet?IBIF_webapp=/ibi_apps&IBIC_server=EDASERVE&IBIWF_msgviewer=ON&IBIAPP_app=maccotoil%20ifs&&IBIMR_drill=X,hronavyq/hronavyq.htm&IBIF_ex=R1152D2.fex&CLICKED_ON=&TOD=16.21.04&WFFMT=HTML&YEAR=2008&PERIOD=01&REPTYPE=NAVY&CATEGORY=RN%20Only&ORG_CODE=497ex&PRODUCTIVITY=FSL%20Off-Bookings%20OOS&SUB_PROJECT_ID=ADMIN&CLASS=M%26A


2. Application/"Self Service"

htp://chaos/ibi_apps/WFServlet?IBIF_webapp=/ibi_apps&IBIC_server=EDASERVE&IBIWF_msgviewer=ON&IBIAPP_app=reports&IBIF_ex=R1152D2.fex&CLICKED_ON=&TOD=16.27.02&WFFMT=HTML&YEAR=2008&PERIOD=01&REPTYPE=NAVY&CATEGORY=RN%20Only&ORG_CODE=497ex&PRODUCTIVITY=FSL%20Off-Bookings%20OOS&SUB_PROJECT_ID=ADMIN&CLASS=SAFE


If the drilldown fex is missing from MRE it does not search the application path. Instead you get a message

Error occurred. 
ERROR: ERROR_MR_FEX_NOT_FOUND Can't create item object based on provided item key R1152D2.fex.  


Of course we could just code the drill as a URL

TYPE=DATA,COLUMN=N9,            URL=http://chaos/ibi_apps/WFServlet? (IBIF_webapp=/ibi_apps IBIC_server=EDASERVE IBIWF_msgviewer='ON' IBIAPP_app='reports' IBIF_ex='R1152D2' TOD='&TOD' WFFMT='&WFFMT' YEAR='&FINYEAR' PERIOD &OPERATOR2 '&FINPERIOD'  REPTYPE='NAVY' CATEGORY=BKG_NAVY_CATEG ORG_CODE=BKG_NAVY_ORG_CODE PRODUCTIVITY=NEW_ACTIVITY_PROD_FULL SUB_PROJECT_ID='ADMIN' CLASS=BKG_NAVY_ACTIVITY_CLASS) , $



But this does not seem very flexible or intuitive.


Does anyone know of a simple way to make the distinction?

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



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
 
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006Report This Post
Expert
posted Hide Post
John, I'm just beginning to look into DevStuido 7.6.5.

As you point out, the drill down links generated by WebFOCUS are very different from the v5.3 version.

But the MRE and Self Service links are distinct, so I'm not sure what your question is...

Cheers,


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Master
posted Hide Post
The question is:

Can I easily generate the link to run application server code from MRE to save having to have multiple copies of the drilldown program in each MRE environment?



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
 
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006Report This Post
Expert
posted Hide Post
That's a good one!

There doesn't appear to be a way to generate a drill-down to a self-service fex from an MRE report.

Unless there's some other way, creating two JavaScript functions, one to call an MRE fex and one to call a self service fex may be a possibility.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
John,

Unfortunately, it's a bit cumbersome, but, I will detail how we've done it..

What we do is to do the call from MRE, and, grab all the & variables set via the client, site.wfs, cgivars, etc, and/or, run a focexec, etc. and excute/keep the focexec in the app folder:

We have 2 folders, called whatever1, whatever2 within a DOMAIN in MRE.

In whatever1, we have:

FOCEXEC01A.fex

-SET &VARIABLE1 = 1;
-MRNOEDIT -INCLUDE APPFOLDER/FOCEXEC0.fex
-EXIT

in the called FOCEXEC, a report/graph is generated and we pass a DRILL_CNTR, say, 1 through 4
the FOCEXEC to execute upon drill, FOCEXEC01B, which is in whatever2 under the same domain:

FOCEXEC01B.fex

-DEFAULT &DRILL_CNTR = 0;
-*
-IF &DRILL_CNTR EQ 1 GOTO FIRST ELSE
-IF &DRILL_CNTR EQ 2 GOTO SECOND ELSE
-IF &DRILL_CNTR EQ 3 GOTO THIRD ELSE
-IF &DRILL_CNTR EQ 4 GOTO FOURTH ELSE
- GOTO START_HERE;
-*
-START_HERE
-MRNOEDIT -INCLUDE APPFOLDER/FOCEXEC1.fex
-EXIT
-FIRST
-MRNOEDIT -INCLUDE APPFOLDER/FOCEXEC2.fex
-EXIT
-SECOND
-MRNOEDIT -INCLUDE APPFOLDER/FOCEXEC3.fex
-EXIT
-THIRD
-* PDF output from FOCEXEC2
-MRNOEDIT -INCLUDE APPFOLDER/FOCEXEC4.fex
-EXIT
-FOURTH
-* PDF output from FOCEXEC4
-MRNOEDIT -INCLUDE APPFOLDER/FOCEXEC5.fex
-EXIT

FOCEXEC1 through 5 are in an APP folder.

Hope this is what you were looking for, AND, it helps...

Tom


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Expert
posted Hide Post
A potential solution:

For MRE drilldowns from an MRE report, code the fex as normal.

For self serve drilldowns from an MRE report, call a Javascript function, passing drilldown fex name and parameter name/value pairs, as in this example:

TABLE FILE CAR
SUM
     SALES
BY COUNTRY
BY MODEL
ON TABLE NOTOTAL
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
$
TYPE=DATA,
     COLUMN=N1,
     JAVASCRIPT=runSelf('bid2' 'COUNTRY' N1 'MODEL' MODEL 'SALES' SALES),
$
TYPE=DATA,
     COLUMN=N2,
     FOCEXEC=app/bid1(MODEL=N2),
$
ENDSTYLE
END
-RUN
-HTMLFORM BEGIN
<html>
<head>
<script language="JavaScript">
function runSelf()
{
urlSelf = '/ibi_apps/WFServlet?IBIF_ex=' + arguments[0];

for (var i=1; i < arguments.length; i=i+2)
  {
  urlSelf += '&' + arguments[i] + '=' + arguments[i+1];
  }
window.location = urlSelf;
}
</script>
</head>
<body>
!IBI.FIL.BID1;
</body>
</html>
-HTMLFORM END


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
I realize that anything that isn't automatic isn't great, but what about creating a fex in the MRE that looks something like:

-DEFAULT &FEX_TO_EX='CARINST'
-MRNOEDIT -INCLUDE &FEX_TO_EX  


That way you can point to this new mre fex and pass the FEX_TO_EX as just another parameter.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Expert
posted Hide Post
John,

If you are looking to rationalise the number of environments within which you hold your fexes, then why not go the whole hog and have all your fexes in your apps folders and call them via tailored HTML launch pages? Then the drilldowns will always expect the drilldown fex to be located in your apps folders (via the path).

You are not going to escape from the need to have the originating prog file (fex or HTML) held within the Domain folder, purely because there has to be some sort of reference that can be displayed within the "domain tree". By taking the route of having unique launch pages within the MRE domains, it doesn't matter where in your apps folders the fexes are, you just have to ensure that your HTML points there instead of the MRE folders -

<INPUT type=hidden name="IBIF_ex" value="fexfilename.fex">
<INPUT type=hidden name="IBIAPP_app" value="baseapp" id="IBIAPP_app">
<!-- the following line turns off autoprompting -->
<INPUT type=hidden name="IBIF_wfdescribe" value="OFF" id="IBIF_wfdescribe">
<!-- The following lines are used to point at MRE fexes -->
<!--
<INPUT type=hidden name="IBIMR_action" value="MR_RUN_FEX">
<INPUT type=hidden name="IBIMR_sub_action" value="MR_STD_REPORT">
<INPUT type=hidden name="IBIMR_domain" value="defaultx/defaultx.htm">
<INPUT type=hidden name="IBIMR_folder" value="#defaultfoldr">
<INPUT type=hidden name="IBIMR_fex" value="app/fexfilename.fex">
-->

If you utilise amper autopromting, then I have a pair of HTML files that give a similar layout using framesets if you are interested?

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
Master
posted Hide Post
Anthony

I think I have seen a consultant that has used your technique to 'spoof' amper autoprompt and it looks very nice Wink

Adapting your solution to amperautoprompt, it seems that I should be able to have a 'stub' focexec that contains the amper variables to be prompted for in MRE and then I need to switch context by calling a URL that points to the application.

eg

-DEFAULTS &TITLE = 'R1152 Navy Partnering'
-*SET &ECHO = ALL;
-SET &DUMMY = &RPT_TYPE.(<Naval Summary with Drilldown,1>,<Hierarchy with Drilldown,2>).Report Type. ;
-*-SET &DUMMY = &FINPERIOD_TYPE.(GL Postings,Date Worked).Chosen Period Applies to. ;
-SET &DUMMY = &FINYEAR.(2008,2007,2006,2005).Enter Financial Year. ;
-SET &DUMMY = &FINPERIOD.(01,02,03,04,05,06,07,08,09,10,11,12).Enter Financial Period. ;
-SET &DUMMY = &GL_TYPE.(Single,Cumulative).For GL only Single Financial Period or Cumulative. ;
-SET &DUMMY = &WFFMT.(<HTML,HTML>,<Excel,EXL2K>,<PDF,PDF>).Select display output. ;


CALL URL=http://chaos/ibi_apps/WFServlet? (IBIF_webapp=/ibi_apps IBIC_server=EDASERVE IBIWF_msgviewer='ON' IBIAPP_app='reports' IBIF_ex='R1152D2' TOD='&TOD' WFFMT='&WFFMT' YEAR='&FINYEAR' PERIOD &OPERATOR2 '&FINPERIOD'  REPTYPE='NAVY' CATEGORY=BKG_NAVY_CATEG ORG_CODE=BKG_NAVY_ORG_CODE PRODUCTIVITY=NEW_ACTIVITY_PROD_FULL SUB_PROJECT_ID='ADMIN' CLASS=BKG_NAVY_ACTIVITY_CLASS) , $



Unfortunately I can call a URL within a drilldown but there does not seem to be the syntax to call a URL unconditionally from a .fex.

Unless of course someone out there knows...



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
 
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006Report This Post
Expert
posted Hide Post
John,

Have you considered using HTMLFORM syntax with a page redirection?

-HTMLFORM BEGIN
<html>
<head>
<title>Auto call Fex in Applications</title>
<script language=javascript>
  this.location="/ibi_apps/WFServlet?IBIF_webapp=/ibi_apps&|IBIC_server=EDASERVE&|IBIWF_msgviewer=ON&|IBIAPP_app=baseapp&|IBIF_ex=carinst";
</script>
</head>
<body>
</body>
</html>
-HTMLFORM END

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
Master
posted Hide Post
Tony

Thanks for that. Will give it a try sometime and its very useful technique in general since I did not know how to redirect.

How to put ampers in URL's was bugging the life out of me. Did not realise it was as simple as putting '&|'.

I have had a brainwave and come upon possibly a very simple solution to this problem.

I should be able to have a 'stub' focexec that contains the amper variables to be prompted for in MRE and then I need to switch context by EXEC'ing a fex that points to the application.

eg


-DEFAULTS &TITLE = 'R1152 Navy Partnering'
-*SET &ECHO = ALL;
-SET &DUMMY = &RPT_TYPE.(<Naval Summary with Drilldown,1>,<Hierarchy with Drilldown,2>).Report Type. ;
-*-SET &DUMMY = &FINPERIOD_TYPE.(GL Postings,Date Worked).Chosen Period Applies to. ;
-SET &DUMMY = &FINYEAR.(2008,2007,2006,2005).Enter Financial Year. ;
-SET &DUMMY = &FINPERIOD.(01,02,03,04,05,06,07,08,09,10,11,12).Enter Financial Period. ;
-SET &DUMMY = &GL_TYPE.(Single,Cumulative).For GL only Single Financial Period or Cumulative. ;
-SET &DUMMY = &WFFMT.(<HTML,HTML>,<Excel,EXL2K>,<PDF,PDF>).Select display output. ;


EXEC R1152_Navy_Partnering TOD='&TOD', WFFMT='&WFFMT', YEAR='&FINYEAR', PERIOD='&FINPERIOD',  RPT_TYPE='&RPT_TYPE', FINPERIOD_TYPE='&FINPERIOD_TYPE'



I tested this and it effectively switches context from MRE to Application so that all subsequent drilldowns will pick up from the application.

Note the long filename permitted by Application calls.

I have not investigated possible problems with unwarranted prompting but it seems very promising.

Note this requires EXEC and not EX as this URL shows

I have only tested this in 762 would be pleased to hear from others with other releases.



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
 
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006Report This Post
Master
posted Hide Post
Just found a flaw in this technique:

FOC_NONE does not work in an EXEC'ed FOCEXEC



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
 
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006Report This Post
Member
posted Hide Post
In mid 2005 I wrote a WebFOCUS Newsletter Article 'Drilling Down from a Managed Reporting Procedure to a WebFOCUS Server Procedure' that provides information of how to drill-down to a WF Server procedure from a MR report. The information is integrated into core documentation:
Technical Memo 4580: Drilling Down From a Managed Reporting Procedure to a Procedure Located on the WebFOCUS Reporting Server 5.3
and in then into Rel 71 and 76 MR Developer Guide (see Rel 76 Chapter 2 topic 'Drilling Down from a Managed Reporting Procedure to a WebFOCUS Server Procedure'. Syntax explanation and code examples are included in the documentation.

The WF Environmental variable FOCEXURL controls where the WF Client will look for the drill down. When running reports from MR the default is to look within MR. The parameter on the URL to the WF Servlet that tells the WF client the report resides in MR is IBIMR_drill. So you need to SET FOCEXURL in your FEX to override the default setting within MR.

Here is the example code from our MR Developer Chapter 2 topic Drilling Down From a Managed Reporting Procedure to a Procedure on the WebFOCUS Reporting Server
Example:
The following illustrates how to drill down from a Managed Reporting procedure to a procedure
located on the WebFOCUS Reporting Server.
Main report (main.fex, located in the Standard Reports folder of a domain):
-SET &FOCEXURL='/ibi_apps/WFServlet?' | '&';
-SET &FOCEXURL=&FOCEXURL | 'IBIAPP_app=ibinccen' | '&'
SET FOCEXURL=&FOCEXURL
TABLE FILE CENTHR
PRINT START_DATE PAYSCALE POSITION
BY FULLNAME
ON TABLE SET PAGE-NUM OFF
ON TABLE SET STYLE *
GRID=OFF, $
TYPE=DATA,
COLUMN=N4,
FOCEXEC=drilldow (DESC=POSITION)
,
$
ENDSTYLE
END
Drill-down report (drilldow.fex, located on the WebFOCUS Reporting Server):
TABLE FILE CENTHR
SUM POSITION_DESC
WHERE POSITION = '&DESC';
ON TABLE SET PAGE-NUM OFF
ON TABLE SET STYLE *
GRID=OFF, $
END

Note the values the above example in FOCEXURL are relative (don't include protocol, host and port) because the values within the user's browser context (connected to WF application environment) will be used. If you use ReportCaster to distribute reports to users via email and ftp the value specified for FOCEXURL must be absolute (include protocol, host and port) and the user must have intranet/internet access from their machine to the WF Client to run the drill down request.

the connection information So in your code you need to set teh FOCEXURL environmental variable On the URL submitted to the WF Client The parameter on the URL to the WF Servlet that specifies to look in MR for the drill down Here is a code example showing how to code FOCEXURL for both FEX is FOCEXURL. trick is to tell the WF Client that the drill down FEX does not reside in MR. This is done by setting FOCEXURL to not include the parameter IBIMR_drill. The IBIMR_drill parameter tells the WF Client what domain or user area (where a My Reports are stored) the


Susan Trommer
Information Builders
 
Posts: 28 | Registered: May 22, 2003Report This Post
Member
posted Hide Post
Opps..ignore the last paragraph in my prior post. I wasn't scrolled all the way to the bottom to see it and I should have deleted it.


Susan Trommer
Information Builders
 
Posts: 28 | Registered: May 22, 2003Report This Post
Virtuoso
posted Hide Post
Here's something you might try. It's an idea I used on another thred but something I have incorporated into my environment to solve this problem.

As mentioned, one way to drill down to a server fex from an MRE fex was to manually create the drilldown URL. Then you get all sorts of issues with managing URL length, use of FOC_NONE, etc.

What seems to work very well for me is to create a simple "shell" fex inside of MRE that contains
-MRNOEDIT -INCLUDE fexname

I supposed you could even use &fexname.EVAL and then if you passed the server proc name as a parm you would have a single fex that allows you to run any server based fex from within MRE. This could reside in a "common" domain which you would specify in your drill procedure (common/app/shell.fex).

All of the parameters would get populated as in normal processing (including any using FOC_NONE) and you only need to maintain your code in a single location.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Master
posted Hide Post
I can call a self-serve fex from an MRE fex by adding this to the top of the MRE Fex...

SET FOCEXURL = http://svr99wfrs/ibi_apps/WFServlet

Then, just do the drilldown in stylesheet like usual...
TYPE=DATA,
COLUMN=CURR_OPEN_ORDERS,
TARGET='_blank',
FOCEXEC=cp_opentickets(CUST_NUM=CUST_NUMBER PL_NUM=IDER),$

Hope this helps someone.


Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.
 
Posts: 611 | Registered: January 04, 2007Report 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     [SHARING] Is there an Easy way to Drilldown to Application .fex from MRE launched fex

Copyright © 1996-2020 Information Builders