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.
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
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, 2013
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, 2005
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, 2005
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
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, 2005
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, 2005
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, 2005
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, 2005