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     [CLOSED] Using variables from a -INCLUDE in a RO

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Using variables from a -INCLUDE in a RO
 Login/Join
 
Expert
posted
This should be, and probably is, simple. But, I guess I'm missing a piece of this puzzle.

What I need it to use the variables (&UserID, used in the HEADING, and &CARZ_Filter, used as a filter) from "CARZ_Filter.fex" in "CARZ_Report_RO.fex" (The RO).

Using "-INCLUDE IBFS:/WFC/Repository/CARZ/CARZ_Filter.fex" in the "Preprocessing Other" section of the RO doesn't work, nor does it work within the "Report" section. by "doesn't work" I mean that the variables/filters aren't available in the RO when a user creates a report from it.

I have similar issue using the MFD_Profile within the synonym.

Here's the pieces to my puzzle:

The Filter
-TYPE *** CARZ_Filter.fex ***
APP PATH CARZ
-RUN

-SET &CARZ_Filter = DECODE &UserID ('Tony A' 'ENGLAND' 'Doug' 'FRANCE' 'Irene' 'ITALY' 'Jackie' 'JAPAN' 'Willie' 'W GERMANY' ELSE 'Switzerland') ;

-TYPE *** &UserID can see &CARZ_Filter ***
-* Use the HTMLFORM to run this independently from the report, just to see the results.
-*-HTMLFORM BEGIN
-*&UserID can see &CARZ_Filter
-*-HTMLFORM END
-RUN


The Report: You can change the &UserID and run this directly and see that the filter works.
-TYPE *** CARZ_Report.fex ***

-* Six test lines for SETting &UserIDs for filtration in the CARZ_Filter fex.
-SET &UserID = 'Tony A' ;
-*-SET &UserID = 'Doug' ;
-*-SET &UserID = 'Irene' ;
-*-SET &UserID = 'Jackie' ;
-*-SET &UserID = 'Willie' ;
-*-SET &UserID = 'Steve' ;

-INCLUDE IBFS:/WFC/Repository/KGPCo_IT/CARZ_Filter.fex

TABLE FILE CARZ
HEADING
"Here's &UserID.EVAL's report for &CARZ_Filter "
PRINT *
WHERE COUNTRY EQ '&CARZ_Filter.EVAL'
ON TABLE SET EMPTYREPORT ON
END


The Synonym
FILENAME=CARZ, SUFFIX=FOC,$
  SEGMENT=SEG01, SEGTYPE=S3,$
    FIELDNAME=COUNTRY,     ALIAS=E01, USAGE=A10,  TITLE='Country', FIELDTYPE=I,$
    FIELDNAME=CAR,         ALIAS=E02, USAGE=A16,  TITLE='Car',$
    FIELDNAME=MODEL,       ALIAS=E03, USAGE=A24,  TITLE='Model',$
    FIELDNAME=DEALER_COST, ALIAS=E04, USAGE=D7C,  TITLE='Dealer Cost',$
    FIELDNAME=RETAIL_COST, ALIAS=E05, USAGE=D7C,  TITLE='Retail Cost',$
    FIELDNAME=PROFIT,      ALIAS=E06, USAGE=D12C, TITLE='Profit',$


Thanks In advance,
Doug

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




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Virtuoso
posted Hide Post
An assumption...

I haven't tried it myself with RO but have you tried to have your filter fex as in the universal_profile and/or have the variable as global (with two ampersand) and not local (with one ampersand) ?


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Virtuoso
posted Hide Post
Doug

I was able to make it work by putting this code in the preprocessing other section.


-SET &UserID = 'Tony A' ;
-INCLUDE IBFS:/WFC/Repository/KGPCo_IT/car_filter.fex


In the real world I think you could use &FOCSECUSER to get the ID and not have to -SET &UserID


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report This Post
Expert
posted Hide Post
MartinY: An assumption... That is an alternative as MFD_PROFILE. I had issues with that too and intend to use that methodology when synonyms will be directly accessed..

Chuck:
1) I was able to make it work
Interesting. I need to retry it with optimism.
    Did you just copy and paste my Report Code in to the Report section via text edit?
    Does the heading show both values?
2) &FOCSECUSER Yes, that's the real world solution. This is just a POC.

Right now, I'm analyzing several methodologies to determine which one will be the easiest to maintain.
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Virtuoso
posted Hide Post
Doug

Yes I pasted the code into the report section and the heading had both values. One caveat.. I created the RO against the car file so it put TABLE FILE ibisamp/car in the code but the rest of the code is yours.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report This Post
Master
posted Hide Post
You could do masterfile filtering in the Pre-Processing
 
-SET &UserID = 'Tony A' ;

-SET &CARZ_Filter = DECODE &UserID ('Tony A' 'ENGLAND' 'Doug' 'FRANCE' 'Irene' 'ITALY' 'Jackie' 'JAPAN' 'Willie' 'W GERMANY' ELSE 'Switzerland') ;

FILTER FILE ibisamp/car ADD
NAME=USERFILTER, DESC=FILTER COUNTRY BY USER ID
IF COUNTRY EQ &CARZ_Filter.EVAL
END

SET FILTER =USERFILTER IN ibisamp/car ON
 


Docs HERE


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
 
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Report This Post
Expert
posted Hide Post
Chuck:
1) I was able to make it work
I retried it with optimism and got the
"Failed to save a component
  Error found while validating this component:
  Please verify the syntax and try again." message.

It's as though it doesn't like DM commands within the Preprocessing Other component.
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Virtuoso
posted Hide Post
Doug

Ahhh yes I forgot I did get that error and moved the HEADING after the WHERE and all was good. Go figure...


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report This Post
Expert
posted Hide Post
That was the second error. But, I got that error when "...putting this code in the preprocessing other section.
-SET &UserID = 'Tony A' ;
-INCLUDE IBFS:/WFC/Repository/KGPCo_IT/car_filter.fex
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Virtuoso
posted Hide Post
Doug

I am using 8203 and here is the code in my -INCLUDED fex. The preprocessing section saved without error.


-SET &CARZ_Filter = DECODE &UserID ('Tony A' 'ENGLAND' 'Doug' 'FRANCE' 'Irene' 'ITALY' 'Jackie' 'JAPAN' 'Willie' 'W GERMANY' ELSE 'Switzerland') ;
-RUN


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report This Post
Expert
posted Hide Post
Maybe that's it, I pasted it as a -INCLUDE ...fex

Retrying... by pasting just the code from within the fex rather than the -INCLUDE ...fex

Thank you for supporting Focal Point!

This message has been edited. Last edited by: Doug,
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Expert
posted Hide Post
I did get that to work Smiler without the -INCLUDE Frowner That's a step in the right direction Smiler

Preprocessing Section:
-SET &UserTest =EDIT(&FOCSECUSER,'999999999999999') ;
-SET &UserID =IF '&UserTest.EVAL' EQ 'ActiveDirectory' THEN EDIT(&FOCSECUSER,'$$$$$$$$$$$$$$$$99999999999999999999') ELSE &FOCSECUSER;
-SET &UserID=TRUNCATE(&UserID) ;
-SET &CARZ_Filter = DECODE &UserID ('Doug' 'ENGLAND' 'John' 'FRANCE' 'Ken' 'ITALY' 'Jackie' 'JAPAN' 'Willie' 'W GERMANY' ELSE 'Switzerland') ;
-RUN

Report Section:
ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
SET SQUEEZE=ON
SET HTMLCSS=ON
SET ARGRAPHENGINE=JSCHART
-DEFAULTH &WF_EMPTYREPORT=ON;
SET EMPTYREPORT=&WF_EMPTYREPORT

SET EMBEDHEADING=ON
SET GRAPHDEFAULT=OFF
-DEFAULTH &WF_SUMMARY='Summary';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
TABLE FILE kgpco_it/carz
SUM CARZ.SEG01.DEALER_COST
BY CARZ.SEG01.COUNTRY
BY CARZ.SEG01.CAR
BY CARZ.SEG01.MODEL
WHERE CARZ.SEG01.COUNTRY EQ &CARZ_Filter. (|FORMAT=A10).QUOTEDSTRING;
HEADING
"Here's &UserID.EVAL's report for &CARZ_Filter "

ON TABLE NOTOTAL
ON TABLE SET STYLE *
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, SUMMARY=&WF_SUMMARY.QUOTEDSTRING, HFREEZE=OFF, $
ENDSTYLE
END
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Expert
posted Hide Post
There's an issue with this methodology...

The issue is that it was created as a RO, but after editing it, as text, it no longer acts like a RO. It's just a plan fex which users cannot use for creating reports.

What now?
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Virtuoso
posted Hide Post
Doug

I'm not sure. That code is under the preprocessing other and can only be edited in text. I went back and tried to create a report with this RO on my machine and it allowed me to do it. I am on 8203... Sounds like it is time for techsupport...


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report This Post
Expert
posted Hide Post
Thanks Chuck,

I am on 8202M Gen 60. May be time for a Case.

I'm also having a "Coding Issue Using a MFD_Profile" which I'll present here in FP first, and on to a Case if needed.
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Guru
posted Hide Post
Any word on this one....?


WebFOCUS Administrator @ Worldpay FIS
PROD/DEV/TEST: 8204, SANDBOX: 8206 soon - BIP, Reportcaster, Resource Manager, EUM, HyperStage soon, DB: HIVE,Oracle,MSSQL
 
Posts: 291 | Location: Greater Cincinnati  | Registered: May 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     [CLOSED] Using variables from a -INCLUDE in a RO

Copyright © 1996-2020 Information Builders