[SOLVED] Drilldown to data rows with multiselect parameters
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,
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.
The multi-select values are already in the &COUNTRY etc, so just pass those values.
WF 7.6.10, Windows, PDF, Excel
December 14, 2011, 06:06 PM
Mighty Max
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.