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.
I created one *.fex that will generate a ticked, comma delimited list of countries. This is stuck into an & variable.
getCountryArray.fex (Seems to work as I want)
-DEFAULT &DaCountry = '' -SET &DaCountry = UPCASE(&DaCountry.LENGTH, &DaCountry, 'A&DaCountry.LENGTH'); -SET &DaCountry = IF TRUNCATE(&DaCountry) EQ '' THEN '''-1''' ELSE '%' || &DaCountry || '%'; TABLE FILE CAR PRINT CAR.ORIGIN.COUNTRY WHERE CAR.ORIGIN.COUNTRY LIKE &DaCountry.QUOTEDSTRING; ON TABLE NOTOTAL ON TABLE HOLD FORMAT ALPHA END -* Generate the IN List that will be used in subsequent reports/drill downs. -SET &LIMIT=&LINES; -SET &I=1;
-REPEAT ENDLOOP &LIMIT TIMES -READ HOLD NOCLOSE &COUNTRY.10 -SET &COUNTRY.&I=&COUNTRY; -SET &COUNTRY_IN_LIST = IF &I EQ 1 THEN &COUNTRY_IN_LIST || '''' || &COUNTRY.&I ELSE &COUNTRY_IN_LIST || ''',''' || &COUNTRY.&I; -SET &I=&I+1; -ENDLOOP
-*If Blank - set in list to '-1' so subsequent queries using &COUNTRY_IN_LIST return no data (no matching country) -SET &COUNTRY_IN_LIST = IF TRUNCATE(&COUNTRY_IN_LIST) EQ '' THEN '''-1''' ELSE &COUNTRY_IN_LIST || ''''; -SET &COUNTRY_IN_LIST = IF TRUNCATE(&COUNTRY_IN_LIST) EQ '' THEN '_FOC_NULL' ELSE TRUNCATE(&COUNTRY_IN_LIST); -TYPE &COUNTRY_IN_LIST -CLOSE HOLD -? &
I then created a top level report that includes mainReport.fex. (seems to work like I want). This report has a Drill Down to a detail report passing the comma delimited country list.
TABLE FILE CAR SUM CAR.BODY.DEALER_COST CAR.BODY.RETAIL_COST WHERE CAR.ORIGIN.COUNTRY IN (&COUNTRY_IN_LIST); ON TABLE SET PAGE-NUM NOLEAD ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT HTML ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty, $ TYPE=DATA, COLUMN=N1, DRILLMENUITEM='WhatCarsMakeTheseNumbers', FOCEXEC=/WFC/Repository/H2OSales/~jeremysturgill/inListCarTest/drillDownReport1.fex( \ DRILLCOUNTRY = &COUNTRY_IN_LIST.QUOTEDSTRING \ ), $ ENDSTYLE END
The drill down accepts the ticked, comma delimited ('ENGLAND', 'GERMANY') list and displayes the selected contries. This seems to work like I want.
drillDownReport1.fex
-SET &DRILLCOUNTRY = IF TRUNCATE(&DRILLCOUNTRY) EQ '' THEN '_FOC_NULL' ELSE &DRILLCOUNTRY;
TABLE FILE CAR PRINT CAR.COMP.CAR CAR.BODY.DEALER_COST CAR.BODY.RETAIL_COST BY LOWEST CAR.ORIGIN.COUNTRY WHERE CAR.ORIGIN.COUNTRY IN (&DRILLCOUNTRY); ON TABLE SET PAGE-NUM NOLEAD ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT HTML ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty, $ ENDSTYLE END
This all works the way I'd like it to by creating a dynamic IN list.
HOWEVER - my end user is complaining that IF he runs the drillDownReport1.fex standalone - he has to remember to put in the ticks and he doens't like that.
Is there a better way to do this? Build an IN list - use the IN list in subsequent reports - but somehow allow the end user to supply a value, like JAPAN, on the drill down - without ticks??This message has been edited. Last edited by: stur0063,
webFOCUS 8207.15 WindowsServer 2019
Posts: 120 | Location: Minnesota | Registered: August 26, 2013
Minnesota, does your customer only run the drilldown for 1 country at a time? if so, then do something klugy like this:
-DEFAULT &DRILLCOUNTRY = JAPAN ;
-TYPE &DRILLCOUNTRY
-SET &first = POSIT ( &DRILLCOUNTRY.QUOTEDSTRING , &DRILLCOUNTRY.LENGTH, '''' , 1, 'I2');
-TYPE &first
-SET &DRILLCOUNTRY = IF &first NE 0 THEN &DRILLCOUNTRY ELSE '''' | &DRILLCOUNTRY || '''' ;
-TYPE &DRILLCOUNTRY
-SET &DRILLCOUNTRY = IF TRUNCATE(&DRILLCOUNTRY) EQ '' THEN '_FOC_NULL' ELSE &DRILLCOUNTRY;
TABLE FILE IBISAMP/CAR
HEADING
"DRILLCOUNTRY IS &DRILLCOUNTRY "
PRINT
CAR.COMP.CAR
CAR.BODY.DEALER_COST
CAR.BODY.RETAIL_COST
BY LOWEST CAR.ORIGIN.COUNTRY
WHERE CAR.ORIGIN.COUNTRY IN (&DRILLCOUNTRY);
END
it'll work even if -DEFAULT &DRILLCOUNTRY = 'JAPAN' ; (with quotes around the thing) If the &DRILLCOUNTRY is coming from some fex, where you control it, then it will already have quote marks, and the test condition &first will always evaluate to non-zero. ... its colder in nyc today than it is in minnesota.
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
addendum: as an aside, i am flabbergasted by a tiny little thing in your post... apparently, in WF8, the unthinkable has happened. Even tho Noreen promised it would never, ever happen... and the map of the world has in fact been updated. I bemoan the loss of West Germany, as much as the loss of the little green running man.
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
They can run this for the IN list - so there can be more than one value. However - I think the end user was mostly concerned with testing the report - and not wanting to remember to "tick" the input.
Your workaround is a clever solution that I didn't think about - and I believe I can spin that.
Sadly - the value really is 'W GERMANY' - but in my haste in writing the original post up - I shortened it.
webFOCUS 8207.15 WindowsServer 2019
Posts: 120 | Location: Minnesota | Registered: August 26, 2013