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     Conditional Include Not Working [SOLVED]

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Conditional Include Not Working [SOLVED]
 Login/Join
 
Member
posted
I am trying to do a conditional include based on the input of a dropdown box. I used some code I found in the forum, but it is not working.

This code is in the parent fex:
-SET &REPORTTYPE = &RTYPE.(,,).REPORTTYPE.;
-SET &DATASET = IF '&REPORTTYPE' EQ 'PRICING' THEN 'MLAPMETRICSORT1.FEX' ELSE 'MLAPMETRICSORT.FEX';


Then in a fex that I am including I make the reference:
-MRNOEDIT -INCLUDE &DATASET

I do not get an error, just no data shows up. If I hard code one fex or the other like:
-INCLUDE MLAPMETRICSORT1.FEX

it works.

Any help would be appreciated.

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


7702,
Windows 7, Excel (2007),
 
Posts: 5 | Registered: June 11, 2013Report This Post
Expert
posted Hide Post
Try -INCLUDE &DATASET.EVAL but even that may not work - embedding amper variables in an INCLUDE statement isn't kosher.

I would do it this way:
-IF &REPORTTYPE EQ 'PRICING' GOTO SORT1 ELSE GOTO SORT;

-SORT1
-MRNOEDIT -INCLUDE mlapmetricsort1.fex

-GOTO SORTEND

-SORT
-MRNOEDIT -INCLUDE mlapmetricsort.fex

-SORTEND


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
Guru
posted Hide Post
Try using the app folder name and then the fex since that is how the GUI does it:

 
-SET &DATASET = 'yourappfolder/mlapmetricsort1.fex';
-MRNOEDIT -INCLUDE &DATASET
 


I know it works for htmlform at least

EDIT: It does work for fexes as well.

BTW when doing an htmlform with the MRNOEDIT, I do not run into the 8 character limit for file names using htmlform. Hmm...

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


WebFOCUS 7.7.03/8.0.08
Dev Studio 7.7.03/8.0.08
App Studio 8.0.08
Windows 7
ALL Outputs
 
Posts: 402 | Location: Upland, IN | Registered: June 08, 2012Report This Post
Member
posted Hide Post
I am going to try Francis' solution.
J, I have tried the app folder and same issue.
Thanks for the replies.


7702,
Windows 7, Excel (2007),
 
Posts: 5 | Registered: June 11, 2013Report This Post
Guru
posted Hide Post
Sorry to hear that... maybe a 7702 thing.


Have you tried through the GUI to get the correct syntax for an INCLUDE outside of the MRE? Maybe its a little different in your version? Confused


WebFOCUS 7.7.03/8.0.08
Dev Studio 7.7.03/8.0.08
App Studio 8.0.08
Windows 7
ALL Outputs
 
Posts: 402 | Location: Upland, IN | Registered: June 08, 2012Report This Post
Member
posted Hide Post
I haven't tried that yet, but Francis solution is going to work fine for what I am doing. Thanks for the replies.


7702,
Windows 7, Excel (2007),
 
Posts: 5 | Registered: June 11, 2013Report This Post
Guru
posted Hide Post
Hold on a sec. If I just hardcode -INCLUDE myfile.fex, it does not work because the file is in the apps folder

If plain old -include yourfex.fex is working, the fex must be in the MRE.

Try:
 
-SET &DATASET = 'app/mlapmetricsort1.fex';
-INCLUDE &DATASET
 


It is good practice to avoid GOTO's as much as possible.


WebFOCUS 7.7.03/8.0.08
Dev Studio 7.7.03/8.0.08
App Studio 8.0.08
Windows 7
ALL Outputs
 
Posts: 402 | Location: Upland, IN | Registered: June 08, 2012Report This Post
Member
posted Hide Post
quote:
-SET &DATASET = 'app/mlapmetricsort1.fex';
-INCLUDE &DATASET



That is one that I have tried. Get this error:

ERROR: ERROR_MR_FEX_NOT_FOUND Can't create item object based on provided item key &DATASET.fex.


7702,
Windows 7, Excel (2007),
 
Posts: 5 | Registered: June 11, 2013Report This Post
Guru
posted Hide Post
Looks like you are right. The original solution I wrote works if the fex is in dataservers and the HTML is in the MRE but not if both of them are in the MRE. This seems vaguely familiar.

The same goes with the htmlform 8 character limit. The limit only applies if the html page is in the MRE.


WebFOCUS 7.7.03/8.0.08
Dev Studio 7.7.03/8.0.08
App Studio 8.0.08
Windows 7
ALL Outputs
 
Posts: 402 | Location: Upland, IN | Registered: June 08, 2012Report This Post
Virtuoso
posted Hide Post
Of course not. An MRE-type -INCLUDE is resolved in the client, where & is just another character. &var substitution only happens on the back-end (webfocus reporting) server.


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Expert
posted Hide Post
quote:
An MRE-type -INCLUDE is resolved in the client, where & is just another character. &var substitution only happens on the back-end (webfocus reporting) server.


So, what does that mean?


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
Guru
posted Hide Post
So we won't have this issue in v.8 then?


WebFOCUS 7.7.03/8.0.08
Dev Studio 7.7.03/8.0.08
App Studio 8.0.08
Windows 7
ALL Outputs
 
Posts: 402 | Location: Upland, IN | Registered: June 08, 2012Report This Post
Expert
posted Hide Post
Confused


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
Guru
posted Hide Post
Francis:

clarification


WebFOCUS 7.7.03/8.0.08
Dev Studio 7.7.03/8.0.08
App Studio 8.0.08
Windows 7
ALL Outputs
 
Posts: 402 | Location: Upland, IN | Registered: June 08, 2012Report This Post
Expert
posted Hide Post
J, thanks for the link to the MRNOEDIT explanation.

Now, how does it apply to code like this:

-MRNOEDIT -INCLUDE &DATASET


Because of -MRNOEDIT, MRE will not evaluate the Dialogue manager variable, but will the reporting server evaluate -INCLUDE &DATASET?


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
Guru
posted Hide Post
If you tie what j.gross says and what the wordy link I sent you says, it makes sense. Mavericks solution won't work because the include is handled client side.

Because of that, he tried to use the MRNOEDIT feature to handle it on the back end. However, the file he was referencing is located in the MRE, so the reporting server knows nothing about it. If it was located in the data servers section, there wouldn't be an issue.

I think this whole thing goes away in 8 since everything is in one repository. Or have the little birds been lying to me all along.


WebFOCUS 7.7.03/8.0.08
Dev Studio 7.7.03/8.0.08
App Studio 8.0.08
Windows 7
ALL Outputs
 
Posts: 402 | Location: Upland, IN | Registered: June 08, 2012Report This Post
Expert
posted Hide Post
In WebFOCUS 8, you can still have fexes residing in app folders on the reporting server...


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
Guru
posted Hide Post
They did lie to me. It is the authentication that is centralized...

I also heard something about getting rid of domains and security is based on tabs for the portal?


WebFOCUS 7.7.03/8.0.08
Dev Studio 7.7.03/8.0.08
App Studio 8.0.08
Windows 7
ALL Outputs
 
Posts: 402 | Location: Upland, IN | Registered: June 08, 2012Report This Post
Virtuoso
posted Hide Post
quote:
Originally posted by Francis Mariani:
...I would do it this way:
-IF &REPORTTYPE EQ 'PRICING' GOTO SORT1 ELSE GOTO SORT;

-SORT1

-MRNOEDIT -INCLUDE mlapmetricsort1.fex

-GOTO SORTEND

-SORT
-MRNOEDIT -INCLUDE mlapmetricsort.fex

-SORTEND


So would I, if they're stored in MR repos.

Just bear in mind, both of the MR includes will be expanded and sent up to the server (and down again, to the browser, for a round trip, if autoprompting kicks in). If they contain any labels (for GOTO or REPEAT), make sure they are unique across the two (or however many) included MR fex files + the main fex.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Virtuoso
posted Hide Post
An alternate solution:

Move the dynamics of which report to invoke out of MR, into the province of the back-end Reporting Server.

* create a little driver fex on the reporting server (not in MR repository), in the same APP folder as the two report fex files;

* hard-code its name and location in the -MRNOEDIT -INCLUDE

* have the driver fex invoke the appropriate report fex (based on the &REPORTTYPE parameter). Note that the -INCLUDE in the driver should not have -MRNOEDIT, since it is stored on the reporting server.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report 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     Conditional Include Not Working [SOLVED]

Copyright © 1996-2020 Information Builders