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] INCLUDE issue

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] INCLUDE issue
 Login/Join
 
Gold member
posted
Hi,
why the below code throws the error: ERROR_MR_FEX_NOT_FOUND Can't create item object based on provided item key &P_INCLUDE.fex

-SET &P_INCLUDE = 'wwtutili/app/get_mv_refresh_date';
-INCLUDE &P_INCLUDE

Thanks,
DD

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


WebFocus 7.7.01
Desktop: Windows and Server: Unix
Excel, HTML, PDF
 
Posts: 69 | Registered: September 12, 2009Report This Post
Gold member
posted Hide Post
I have tried below code, but still it errors out

-SET &P_PATH = 'domainname/app/get_mv_refresh_date.fex';
-SET &P_INCLUDE = '-INCLUDE '|&P_PATH;
-RUN
&P_INCLUDE.EVAL
-INCLUDE domainname/app/get_mv_refresh_date.fex

The ouput shows

(FOC227) THE FOCEXEC PROCEDURE CANNOT BE FOUND:
domainname/app/get_mv_refresh_date.fex
1
0 NUMBER OF RECORDS IN TABLE= 1 LINES= 1
0

Interestingly -INCLUDE domainname/app/get_mv_refresh_date.fex worked fine, but &P_INCLUDE.EVAL did not work.
Any ideas???


WebFocus 7.7.01
Desktop: Windows and Server: Unix
Excel, HTML, PDF
 
Posts: 69 | Registered: September 12, 2009Report This Post
Platinum Member
posted Hide Post
Try

-SET &P_INCLUDE= 'wwtutili/app/get_mv_refresh_date';
-RUN
-INCLUDE &P_INCLUDE
 
Posts: 140 | Location: Adelaide South Australia | Registered: October 27, 2006Report This Post
Member
posted Hide Post
It doesn't work because of the way Managed Reporting works. Amper variables are translated and executed on the Reporting Server. When you run a Managed Reporting (MR) job all pieces from MR that are used (Focexecs, included focexecs, html files, etc.) are gathered by the WebFocus Client and transferred to the reporting server for execution.

In your first post, the -SET &P_INCLUDE line would be sent to the reporting server as is, and the 2nd line -INCLUDE, MR knows it need to get that focexec and send it to the reporting server, but since amper variables are not translated until the next step on the reporting server, MR is looking for a procedure called &P_INCLUDE and therefore you get the ERROR_MR_FEX_NOT_FOUND.

What are you trying to do that you need to use a variable on the -INCLUDE line? You might need to code things a little different or look into using the -MRNOEDIT tags and store some things on the Reporting Server.

Bob




Prod: WebFocus/ReportCaster 7.6.10 - Self Service - Windows 2003 Server - IIS/Tomcat

Test: WebFocus/ReportCaster 7.6.10 - Self Service - Windows 2003 Server - IIS/Tomcat

Databases: MS SQL Server, Focus DB, Output: HTML, Excel 2000 and PDF
 
Posts: 21 | Registered: July 06, 2007Report This Post
Gold member
posted Hide Post
Thanks Bob. We are dynamically calling the Fexes which are stored in the table from a public dashboard. It is a kind of report on Reports.


WebFocus 7.7.01
Desktop: Windows and Server: Unix
Excel, HTML, PDF
 
Posts: 69 | Registered: September 12, 2009Report This Post
Member
posted Hide Post
So if you have variable that tells what report to run you could do something like this:

-IF &REPORT EQ 'REPORT1' GOTO RPT1;
-IF &REPORT EQ 'REPORT2' GOTO RPT2;
-GOTO XXIT;

-RPT1
-INCLUDE domainname/app/get_mv_refresh_date.fex 
-GOTO XXIT;
-RPT2
-INCLUDE domainname/app/secondreport.fex 
-XXIT


Something like that should work, but the downside of it is that the WF Client is going to send the code from both the include focexecs even though only one of them will end of really executing on the reporting server.

Bob




Prod: WebFocus/ReportCaster 7.6.10 - Self Service - Windows 2003 Server - IIS/Tomcat

Test: WebFocus/ReportCaster 7.6.10 - Self Service - Windows 2003 Server - IIS/Tomcat

Databases: MS SQL Server, Focus DB, Output: HTML, Excel 2000 and PDF
 
Posts: 21 | Registered: July 06, 2007Report This Post
Gold member
posted Hide Post
Bob,
We have got 300 reports, So we can't use that logic and reports are spread in different domains. So all these reports with full path (domainname/app/reportname) got stored in table and the generic fex is dynamically displays these in the report as a drill down which users click and run the report. Kind of self-service application.


WebFocus 7.7.01
Desktop: Windows and Server: Unix
Excel, HTML, PDF
 
Posts: 69 | Registered: September 12, 2009Report This Post
Expert
posted Hide Post
SET &P_PATH = 'domainname/app/get_mv_refresh_date.fex';
-MRNOEDIT -INCLUDE &P_PATH.EVAL


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Virtuoso
posted Hide Post
I don't think those two work together. If you use a -MRNOEDIT that means you're looking on the server which then has no concept of domainname.

I think I've got something working like this in the back corner somewhere. I'll see if I can locate it.


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
Gold member
posted Hide Post
Thanks Alot Darin. We really appreciate your help.


WebFocus 7.7.01
Desktop: Windows and Server: Unix
Excel, HTML, PDF
 
Posts: 69 | Registered: September 12, 2009Report This Post
Virtuoso
posted Hide Post
A possible approach, using redirection:

After your fex determines what MR fex (in what domain, with what parameters....) to run, it returns an "-HTMLFORM" that submits an appropriate MR-type request to run the required fex. The reporting server will receive that request in due course, and the results will be directed to the same target as the "HTMLFORM" page.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Virtuoso
posted Hide Post
The code I dug up uses the technique described by j.gross. Since the code runs a fex in MRE, all locations referenced by &vars are also properly resolved within that environment. With a couple modifications to get the appropriate values parsed from your string (which you could actually define in your first request and just pass as additional &vars):
-SET &ECHO=ALL;
-SET &DFILE='untitled/app/darin.fex';
-SET &DOMAIN_LEN=POSIT('&DFILE.EVAL',&DFILE.LENGTH,'/',1,'I3') - 1;
-SET &DOMAIN=GETTOK('&DFILE.EVAL',&DFILE.LENGTH,1,'/',&DOMAIN_LEN.EVAL,'A&DOMAIN_LEN.EVAL');
-SET &FEX_LEN=&DFILE.LENGTH - &DOMAIN_LEN - 5;
-SET &MR_DOMAIN='&DOMAIN.EVAL'||'/'||'&DOMAIN.EVAL'||'.htm';
-SET &FEX=GETTOK('&DFILE.EVAL',&DFILE.LENGTH,-1,'/',&FEX_LEN.EVAL,'A&FEX_LEN.EVAL');
-SET &MR_FEX='app/'|'&FEX.EVAL';
-*
-HTMLFORM BEGIN
<!-- Generated by Report Layout Painter -->
<HTML>
<BODY onload='document.form.submit();'>
<FORM name='form' action='/ibi_apps/WFServlet' method='post' >
<input type='hidden' name='IBIMR_domain' value="&MR_DOMAIN">
<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_fex' value="&MR_FEX">
<input type='hidden' name='IBIF_ex' value="&MR_FEX">
<input type='hidden' name='IBIMR_flags' value="">
<input type='hidden' name='IBIMR_folder' value="#newfoldervwo">
<input type='hidden' name='IBIMR_random' value=''>
<script>
document.form.IBIMR_random.value = Math.random();
</script>
</form>
</BODY>
</HTML>

-HTMLFORM END


Since this is from an older version of WF, the paramters passed and the layout of the HTML form is older as well. I think the new default HTML form uses xml requests, WF javascript, and such.

Also, PLEASE NOTE that this version ALSO REQUIRES the folder name (as contained in the mrrepos.htm file) in which the fex resides in order to properly locate the fex to be run. This must be specified in the IBIMR_folder parameter and will begin with a pound sign (#).
Same technique, just get that value in your table and pass it in a parameter.

Hope this gets you started--

This message has been edited. Last edited by: Darin Lee,


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
Virtuoso
posted Hide Post
Just what i was looking for Darin

I am going to try this next week




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Virtuoso
posted Hide Post
Had to make a couple corrections. Should be correct now - with the exception, as noted above, of proper substitution for the IBIMR_folder value for an &var. The last part (between the htmlbegin and htmlend) is the important part. The values for &vars can be derived via calculation, database field, defined field, pased from other procedures, etc. I'll let someone else figure out how to make it work with the newer default syntax for an HTML launch page.


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
  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] INCLUDE issue

Copyright © 1996-2020 Information Builders