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] Drilldown to data rows with multiselect parameters

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Drilldown to data rows with multiselect parameters
 Login/Join
 
Guru
posted
When dealing with multiselect parameters. I had to add quotes to the parameter values in the drilldown fex.
There appears to be no FIELDNAME.QUOTEDSTRING syntax. Borrowed the sample code from Doug.
Is this the only solution?

  
-* File prc_multiselect_drill.fex

-SET &ECHO='ALL';

-DEFAULT &OUTFORMAT = 'HTML' ;
-DEFAULT &COUNTRY   = FOC_NONE ;
-DEFAULT &CAR       = FOC_NONE ;
-DEFAULT &MODEL     = FOC_NONE ;
-DEFAULT &RANDOM    = '&TOD.EVAL' ;
-DEFAULT &DRILL     = 'N' ;

-IF '&DRILL.EVAL' EQ 'N' GOTO STARTRPT ELSE GOTO ADDQUOTE;
-ADDQUOTE
-SET &COUNTRY = '''' || &COUNTRY || '''';
-SET &CAR = '''' || &CAR || '''';
-SET &MODEL = '''' || &MODEL || '''';

-STARTRPT
TABLE FILE CAR
SUM  'CAR.BODY.DEALER_COST' AS 'DEALER'
     'CAR.BODY.RETAIL_COST' AS 'RETAIL'
BY 'CAR.ORIGIN.COUNTRY'
BY 'CAR.COMP.CAR'
BY 'CAR.CARREC.MODEL'

HEADING
"CARS, As of: &DATEMTDYY @ &TOD (&OUTFORMAT &RANDOM)"
"Reset"
"COUNTRY = &COUNTRY"
"CAR = &CAR"
"MODEL = &MODEL"
" "

WHERE COUNTRY EQ &COUNTRY.(OR(FIND COUNTRY,COUNTRY IN CAR)).Enter a COUNTRY.;
WHERE CAR     EQ &CAR.(OR(FIND CAR,CAR IN CAR)).Enter a CAR.;
WHERE MODEL   EQ &MODEL.(OR(FIND MODEL,MODEL IN CAR)).Enter a MODEL.;
ON TABLE PCHOLD FORMAT &OUTFORMAT.EVAL
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE SET STYLE *
     UNITS=IN, LEFTMARGIN=0.5, RIGHTMARGIN=0.5, TOPMARGIN=0.5, BOTTOMMARGIN=0.5, SQUEEZE=ON, ORIENTATION=PORTRAIT,$
TYPE=REPORT, GRID=OFF, FONT='ARIAL', SIZE=9, COLOR='BLACK', STYLE=NORMAL,$
TYPE=DATA, BACKCOLOR=( 'SILVER' 'WHITE' ),$
TYPE=TITLE, STYLE=BOLD,$
TYPE=DATA, 
     COLUMN=DEALER_COST,
     COLOR='BLUE',
     FOCEXEC=prc_multiselect_drill.fex( \
     OUTFORMAT='&OUTFORMAT' \
     COUNTRY= COUNTRY \
     CAR= CAR \
     MODEL= MODEL \
     RANDOM= '&TOD' 
     DRILL= 'Y' ), 
$
TYPE=HEADING,
     LINE=2,
     ITEM=1,
     OBJECT=TEXT,
     JUSTIFY=RIGHT,
     COLOR='RED',
     FOCEXEC=prc_multiselect_drill.fex( \
     OUTFORMAT='&OUTFORMAT' \
     COUNTRY= 'FOC_NONE' \
     CAR= 'FOC_NONE' \
     MODEL= 'FOC_NONE' \
     RANDOM= '&TOD' 
     DRILL= 'N' ), 
$
ENDSTYLE
END

This message has been edited. Last edited by: Mighty Max,


WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
 
Posts: 320 | Location: Memphis, TN | Registered: February 12, 2008Report This Post
Gold member
posted Hide Post
I'm not totally sure of what you want passed; however, I'm guessing since the parameters are multi-select, you wish to pass these values in the drill down section.

Just pass the paramters:

  
TYPE=DATA, 
     COLUMN=DEALER_COST,
     COLOR='BLUE',
     FOCEXEC=prc_multiselect_drill( \
     OUTFORMAT='&OUTFORMAT' \
     COUNTRY= &COUNTRY.QUOTEDSTRING \
     CAR= &CAR.QUOTEDSTRING \
     MODEL= &MODEL.QUOTEDSTRING ), 
$


The multi-select values are already in the &COUNTRY etc, so just pass those values.


WF 7.6.10, Windows, PDF, Excel
 
Posts: 75 | Location: Dallas, TX | Registered: February 12, 2004Report This Post
Guru
posted Hide Post
I want to drill into the data for the individual row. This means that I have to pass the column values for COUNTRY, CAR, and MODEL. When I pass the column values they are not in quotes which causes the WHERE clause to break. The WHERE clause expects to receive parameters in quotes because they are multi-select.

If I pass the parameter values I am not drilling into the data for an individual row. I am just drilling into the data filtered by parameters.


WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
 
Posts: 320 | Location: Memphis, TN | Registered: February 12, 2008Report This Post
Expert
posted Hide Post
This discussion might help: [STILL OPEN] DS HTML Composer: calling fex not compatible with drilldown to same fex


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
Gold member
posted Hide Post
You only showed the PARENT report and not the CHILD report.

But in my CHILD report, I added the following to my filter selection:

Parent:

Remove the quotes around the FOC_NONE
TYPE=HEADING,
     LINE=2,
     COLOR='BLUE',
     FOCEXEC=prc_multiselect_drill( \
     OUTFORMAT='&OUTFORMAT' \
     COUNTRY= FOC_NONE \
     CAR= FOC_NONE \
     MODEL= FOC_NONE ),
$

Child:

SET &COUNTRY   = IF &COUNTRY EQ ' ' THEN 'FOC_NONE' ELSE &COUNTRY.QUOTEDSTRING ;
-SET &CAR       = IF &CAR     EQ ' ' THEN 'FOC_NONE' ELSE &CAR.QUOTEDSTRING ;
-SET &MODEL     = IF &MODEL   EQ ' ' THEN 'FOC_NONE' ELSE &MODEL.QUOTEDSTRING ;



This worked for me.

This message has been edited. Last edited by: Mary Watermann,


WF 7.6.10, Windows, PDF, Excel
 
Posts: 75 | Location: Dallas, TX | Registered: February 12, 2004Report This Post
Guru
posted Hide Post
Thanks for the help. I'm going to add the missing quotes instead of defining another field with the quotes. Cool


WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
 
Posts: 320 | Location: Memphis, TN | Registered: February 12, 2008Report 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] Drilldown to data rows with multiselect parameters

Copyright © 1996-2020 Information Builders