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 am currently working with a report for an healthcenter. In the report the user has to select multiple "afdeling" translated health-Units. The multiselect does work for the Header-report. But it doesnt work for the Drilldown report. The drilldownreport gives the following warning.
" (FOC257) MISSING QUOTE MARKS: ''A2'' OR ''A3''; BYPASSING TO END OF COMMAND (FOC009) INCOMPLETE REQUEST STATEMENT "
As you can see the double quotes give the problem. We have tried everything, but cant get the drilldown to work.
Anyone have some suggestion how to fix this. Thanx in advance.
As attachement in code both the Header-report as well as the Drilldown report.
Kind regards,
Marcel
Head Report
-* File Mustscorevragenlijst82fex.fex
SET ASNAMES = ON
-DEFAULT &DATUM_VAN = '2008/01/01';
-DEFAULT &DATUM_TOT = '2008/02/02';
-DEFAULT &AFDELING = '''A1'' OR ''A2'' OR ''A3''';
-* 'A1' OR 'A2' OR 'A3'
-DEFAULT &LOCATIE = 'U';
-SET &STR_LEN = &AFDELING.LENGTH;
-SET &AFD_M2 = STRREP(&STR_LEN, &AFDELING, 4, ' OR ', 1, ',', &STR_LEN, 'A&STR_LEN.EVAL') ;
-SET &AFD_M1 = STRIP(&STR_LEN, &AFD_M2, '''', 'A&STR_LEN.EVAL');
DEFINE FILE OPNPRESCORE
Antwoord0/D12=IF EDIT(OPNPRESCORE.SEG01.AntwoordNBA) EQ 0 THEN 1 ELSE 0;
Antwoord1/D12=IF EDIT(OPNPRESCORE.SEG01.AntwoordNBA) EQ 1 THEN 1 ELSE 0;
Antwoord2/D12=IF EDIT(OPNPRESCORE.SEG01.AntwoordNBA) GT 1 THEN 1 ELSE 0;
Antwoord12/D12=IF EDIT(OPNPRESCORE.SEG01.AntwoordNBA) GT 0 THEN 1 ELSE 0;
TotaalSum/D12=IF OPNPRESCORE.SEG01.AntwoordNBA NE ' ' OR ')' OR 'U' THEN 1 ELSE 0;
OPN_DATE2/YYMD=HDATE(OPNPRESCORE.SEG01.OPNDAT, 'YYMD');
Maand/I2=HPART(OPNPRESCORE.SEG01.OPNDAT, 'MONTH', 'I2');
Jaar/I4=HPART(OPNPRESCORE.SEG01.OPNDAT, 'YEAR', 'I4');
END
TABLE FILE OPNPRESCORE
SUM
'CNT.OPNPRESCORE.SEG01.AntwoordNBA' AS 'Totaal Geregistreerde Mustscore'
'OPNPRESCORE.SEG01.Antwoord0' AS 'Mustscore 0'
'OPNPRESCORE.SEG01.Antwoord1' AS 'Mustscore 1'
'OPNPRESCORE.SEG01.Antwoord2' AS 'Mustscore 2plus'
'OPNPRESCORE.SEG01.Antwoord12' AS 'Mustscore 1 + 2plus'
COMPUTE Perc0/D12% = ( OPNPRESCORE.SEG01.Antwoord0 / OPNPRESCORE.SEG01.TotaalSum * 100 );
AS 'Percentage Mustscore 0'
COMPUTE Perc1/D12% = ( OPNPRESCORE.SEG01.Antwoord1 / OPNPRESCORE.SEG01.TotaalSum * 100 );
AS 'Percentage Mustscore 1'
COMPUTE Perc2/D12% = ( OPNPRESCORE.SEG01.Antwoord2 / OPNPRESCORE.SEG01.TotaalSum * 100 );
AS 'Percentage Mustscore 2+'
COMPUTE PercT/D12% = ( OPNPRESCORE.SEG01.Antwoord12 / OPNPRESCORE.SEG01.TotaalSum * 100 );
AS 'Percentage Must 1 + 2plus'
BY 'OPNPRESCORE.SEG01.LOCATIE'
BY 'OPNPRESCORE.SEG01.Jaar'
BY 'OPNPRESCORE.SEG01.Maand'
HEADING
"Overzicht Must-Score"
FOOTING
""
WHERE OPNPRESCORE.SEG01.AntwoordNBA NE ')' OR 'U' OR ' ';
WHERE ( OPNPRESCORE.SEG01.OPN_DATE2 GE '&DATUM_VAN' ) AND ( OPNPRESCORE.SEG01.OPN_DATE2 LE '&DATUM_TOT' );
WHERE OPNPRESCORE.SEG01.LOCATIE EQ '&LOCATIE';
WHERE OPNPRESCORE.SEG01.AFDELING EQ &AFDELING;
ON TABLE SET PAGE-NUM OFF
ON TABLE SUMMARIZE OPNPRESCORE.SEG01.AntwoordNBA OPNPRESCORE.SEG01.Antwoord0 OPNPRESCORE.SEG01.Antwoord1 OPNPRESCORE.SEG01.Antwoord2 OPNPRESCORE.SEG01.Antwoord12 Perc0 Perc1 Perc2 PercT AS 'TOTAL'
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE='A4',
LEFTMARGIN=0.250000,
RIGHTMARGIN=0.250000,
TOPMARGIN=0.250000,
BOTTOMMARGIN=0.250000,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
DEFMACRO=COND0002,
MACTYPE=RULE,
WHEN=N9 LT N10,
$
DEFMACRO=COND0003,
MACTYPE=RULE,
WHEN=N9 LT N11,
$
DEFMACRO=COND0004,
MACTYPE=RULE,
WHEN=N10 LT N11,
$
DEFMACRO=COND0005,
MACTYPE=RULE,
WHEN=N11 GT N9,
$
DEFMACRO=COND0006,
MACTYPE=RULE,
WHEN=N11 GT N10,
$
TYPE=REPORT,
FONT='ARIAL',
SIZE=10,
COLOR='BLACK',
BACKCOLOR='NONE',
STYLE=NORMAL,
$
TYPE=DATA,
BORDER-TOP=LIGHT,
BORDER-BOTTOM=LIGHT,
BORDER-LEFT=LIGHT,
BORDER-RIGHT=LIGHT,
SIZE=8,
BACKCOLOR=( RGB(253 241 229) 'WHITE' ),
$
TYPE=DATA,
COLUMN=N1,
DRILLMENUITEM='Afdelingen Totaal',
FOCEXEC=MustscorevragenlijstPeriodiekDTZHBAFD(LOCATIE=N1 DATUM_VAN=&DATUM_VAN.QUOTEDSTRING DATUM_TOT=&DATUM_TOT.QUOTEDSTRING AFDELING=&AFDELING.QUOTEDSTRING),
TARGET='_blank',
DRILLMENUITEM='Afdelingen per Maand',
FOCEXEC=MustscorevragenlijstPeriodiekDTLOKAFD(LOCATIE=N1 DATUM_VAN=&DATUM_VAN.QUOTEDSTRING DATUM_TOT=&DATUM_TOT.QUOTEDSTRING AFDELING=&AFDELING.QUOTEDSTRING),
TARGET='_blank',
$
TYPE=TITLE,
BORDER-TOP=LIGHT,
BORDER-BOTTOM=LIGHT,
BORDER-LEFT=LIGHT,
BORDER-RIGHT=LIGHT,
BORDER-TOP-STYLE=RIDGE,
BORDER-BOTTOM-STYLE=RIDGE,
BORDER-LEFT-STYLE=RIDGE,
BORDER-RIGHT-STYLE=RIDGE,
BORDER-TOP-COLOR='BLACK',
BORDER-BOTTOM-COLOR='BLACK',
BORDER-LEFT-COLOR='BLACK',
BORDER-RIGHT-COLOR='BLACK',
SIZE=9,
COLOR='WHITE',
BACKCOLOR=RGB(164 78 88),
STYLE=BOLD,
$
TYPE=TITLE,
COLUMN=N1,
DRILLMENUITEM='Afdelingen Totaal',
FOCEXEC=MustscorevragenlijstPeriodiekDTZHBAFD(LOCATIE=N1 DATUM_VAN=&DATUM_VAN.QUOTEDSTRING DATUM_TOT=&DATUM_TOT.QUOTEDSTRING AFDELING=&AFDELING.QUOTEDSTRING),
TARGET='_blank',
DRILLMENUITEM='Afdelingen per Maand',
FOCEXEC=MustscorevragenlijstPeriodiekDTLOKAFD(LOCATIE=N1 DATUM_VAN=&DATUM_VAN.QUOTEDSTRING DATUM_TOT=&DATUM_TOT.QUOTEDSTRING AFDELING=&AFDELING.QUOTEDSTRING),
TARGET='_blank',
$
TYPE=TABHEADING,
SIZE=9,
STYLE=BOLD,
$
TYPE=TABFOOTING,
SIZE=9,
STYLE=BOLD,
$
TYPE=HEADING,
BORDER-TOP=OFF,
BORDER-BOTTOM=OFF,
BORDER-LEFT=OFF,
BORDER-RIGHT=OFF,
BORDER-TOP-STYLE=RIDGE,
BORDER-BOTTOM-STYLE=RIDGE,
BORDER-LEFT-STYLE=RIDGE,
BORDER-RIGHT-STYLE=RIDGE,
BORDER-TOP-COLOR='WHITE',
BORDER-BOTTOM-COLOR='WHITE',
BORDER-LEFT-COLOR='WHITE',
BORDER-RIGHT-COLOR='WHITE',
SIZE=12,
BACKCOLOR='WHITE',
STYLE=BOLD,
JUSTIFY=CENTER,
$
TYPE=HEADING,
LINE=1,
JUSTIFY=LEFT,
$
TYPE=FOOTING,
BORDER-TOP=OFF,
BORDER-BOTTOM=OFF,
BORDER-LEFT=OFF,
BORDER-RIGHT=OFF,
BORDER-TOP-STYLE=DOTTED,
BORDER-BOTTOM-STYLE=DOTTED,
BORDER-LEFT-STYLE=DOTTED,
BORDER-RIGHT-STYLE=DOTTED,
BORDER-TOP-COLOR='WHITE',
BORDER-BOTTOM-COLOR='WHITE',
BORDER-LEFT-COLOR='WHITE',
BORDER-RIGHT-COLOR='WHITE',
BACKCOLOR='WHITE',
STYLE=BOLD,
$
TYPE=SUBHEAD,
SIZE=9,
STYLE=BOLD,
$
TYPE=SUBFOOT,
BORDER-TOP=OFF,
BORDER-BOTTOM=OFF,
BORDER-LEFT=OFF,
BORDER-RIGHT=OFF,
BORDER-TOP-STYLE=RIDGE,
BORDER-BOTTOM-STYLE=RIDGE,
BORDER-LEFT-STYLE=RIDGE,
BORDER-RIGHT-STYLE=RIDGE,
BORDER-TOP-COLOR='WHITE',
BORDER-BOTTOM-COLOR='WHITE',
BORDER-LEFT-COLOR='WHITE',
BORDER-RIGHT-COLOR='WHITE',
SIZE=9,
BACKCOLOR='WHITE',
STYLE=BOLD,
$
TYPE=SUBTOTAL,
SIZE=8,
STYLE=BOLD,
$
TYPE=ACROSSVALUE,
SIZE=8,
STYLE=BOLD,
$
TYPE=ACROSSTITLE,
SIZE=8,
STYLE=BOLD,
$
TYPE=GRANDTOTAL,
SIZE=9,
STYLE=BOLD,
$
TYPE=REPORT,
COLUMN=N12,
SQUEEZE=1.180556,
$
TYPE=REPORT,
COLUMN=N4,
SQUEEZE=1.625000,
$
TYPE=REPORT,
COLUMN=N5,
SQUEEZE=1.000000,
$
TYPE=REPORT,
COLUMN=N6,
SQUEEZE=1.000000,
$
TYPE=REPORT,
COLUMN=N7,
SQUEEZE=1.305556,
$
TYPE=REPORT,
COLUMN=N8,
SQUEEZE=1.402778,
$
TYPE=REPORT,
COLUMN=N9,
SQUEEZE=1.180556,
$
TYPE=REPORT,
COLUMN=N10,
SQUEEZE=1.180556,
$
TYPE=REPORT,
COLUMN=N11,
SQUEEZE=1.250000,
$
ENDSTYLE
END
--------------------------------------
DrillDown Report
-* File Mustscorevragenlijst82fex.fex
SET ASNAMES = ON
-DEFAULT &DATUM_VAN = 'FOC_NONE';
-DEFAULT &DATUM_TOT = 'FOC_NONE';
-DEFAULT &AFDELING = '''A1'' OR ''A2'' OR ''A3''';
-* 'A1' OR 'A2' OR 'A3'
-DEFAULT &LOCATIE = 'U';
-SET &STR_LEN = &AFDELING.LENGTH;
-SET &AFD_M2 = STRREP(&STR_LEN, &AFDELING, 4, ' OR ', 1, ',', &STR_LEN, 'A&STR_LEN.EVAL') ;
-SET &AFD_M1 = STRIP(&STR_LEN, &AFD_M2, '''', 'A&STR_LEN.EVAL');
DEFINE FILE OPNPRESCORE
Antwoord0/D12=IF EDIT(OPNPRESCORE.SEG01.AntwoordNBA) EQ 0 THEN 1 ELSE 0;
Antwoord1/D12=IF EDIT(OPNPRESCORE.SEG01.AntwoordNBA) EQ 1 THEN 1 ELSE 0;
Antwoord2/D12=IF EDIT(OPNPRESCORE.SEG01.AntwoordNBA) GT 1 THEN 1 ELSE 0;
Antwoord12/D12=IF EDIT(OPNPRESCORE.SEG01.AntwoordNBA) GT 0 THEN 1 ELSE 0;
TotaalSum/D12=IF OPNPRESCORE.SEG01.AntwoordNBA NE ' ' OR ')' OR 'U' THEN 1 ELSE 0;
OPN_DATE2/YYMD=HDATE(OPNPRESCORE.SEG01.OPNDAT, 'YYMD');
Maand/I2=HPART(OPNPRESCORE.SEG01.OPNDAT, 'MONTH', 'I2');
Jaar/I4=HPART(OPNPRESCORE.SEG01.OPNDAT, 'YEAR', 'I4');
END
TABLE FILE OPNPRESCORE
SUM
'CNT.OPNPRESCORE.SEG01.AntwoordNBA' AS 'Totaal Geregistreerde Mustscore'
'OPNPRESCORE.SEG01.Antwoord0' AS 'Mustscore 0'
'OPNPRESCORE.SEG01.Antwoord1' AS 'Mustscore 1'
'OPNPRESCORE.SEG01.Antwoord2' AS 'Mustscore 2plus'
'OPNPRESCORE.SEG01.Antwoord12' AS 'Mustscore 1 + 2plus'
COMPUTE Perc0/D12% = ( OPNPRESCORE.SEG01.Antwoord0 / OPNPRESCORE.SEG01.TotaalSum * 100 );
AS 'Percentage Mustscore 0'
COMPUTE Perc1/D12% = ( OPNPRESCORE.SEG01.Antwoord1 / OPNPRESCORE.SEG01.TotaalSum * 100 );
AS 'Percentage Mustscore 1'
COMPUTE Perc2/D12% = ( OPNPRESCORE.SEG01.Antwoord2 / OPNPRESCORE.SEG01.TotaalSum * 100 );
AS 'Percentage Mustscore 2+'
COMPUTE PercT/D12% = ( OPNPRESCORE.SEG01.Antwoord12 / OPNPRESCORE.SEG01.TotaalSum * 100 );
AS 'Percentage Must 1 + 2plus'
BY 'OPNPRESCORE.SEG01.LOCATIE'
BY 'OPNPRESCORE.SEG01.Jaar'
BY 'OPNPRESCORE.SEG01.AFDELING'
HEADING
"Overzicht Must-Score"
FOOTING
""
WHERE OPNPRESCORE.SEG01.AntwoordNBA NE ')' OR 'U' OR ' ';
WHERE ( OPNPRESCORE.SEG01.OPN_DATE2 GE '&DATUM_VAN' ) AND ( OPNPRESCORE.SEG01.OPN_DATE2 LE '&DATUM_TOT' );
WHERE OPNPRESCORE.SEG01.AFDELING EQ &AFDELING;
WHERE OPNPRESCORE.SEG01.LOCATIE EQ '&LOCATIE';
ON TABLE SET PAGE-NUM OFF
ON TABLE SUMMARIZE OPNPRESCORE.SEG01.AntwoordNBA OPNPRESCORE.SEG01.Antwoord0 OPNPRESCORE.SEG01.Antwoord1 OPNPRESCORE.SEG01.Antwoord2 OPNPRESCORE.SEG01.Antwoord12 Perc0 Perc1 Perc2 PercT AS 'TOTAL'
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE='A4',
LEFTMARGIN=0.250000,
RIGHTMARGIN=0.250000,
TOPMARGIN=0.250000,
BOTTOMMARGIN=0.250000,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
DEFMACRO=COND0001,
MACTYPE=RULE,
WHEN=N3 EQ 'A1',
$
DEFMACRO=COND0002,
MACTYPE=RULE,
WHEN=N9 LT N10,
$
DEFMACRO=COND0003,
MACTYPE=RULE,
WHEN=N9 LT N11,
$
DEFMACRO=COND0004,
MACTYPE=RULE,
WHEN=N10 LT N11,
$
DEFMACRO=COND0005,
MACTYPE=RULE,
WHEN=N11 GT N9,
$
DEFMACRO=COND0006,
MACTYPE=RULE,
WHEN=N11 GT N10,
$
TYPE=REPORT,
FONT='ARIAL',
SIZE=10,
COLOR='BLACK',
BACKCOLOR='NONE',
STYLE=NORMAL,
$
TYPE=DATA,
BORDER-TOP=LIGHT,
BORDER-BOTTOM=LIGHT,
BORDER-LEFT=LIGHT,
BORDER-RIGHT=LIGHT,
SIZE=8,
BACKCOLOR=( RGB(253 241 229) 'WHITE' ),
$
TYPE=TITLE,
BORDER-TOP=LIGHT,
BORDER-BOTTOM=LIGHT,
BORDER-LEFT=LIGHT,
BORDER-RIGHT=LIGHT,
BORDER-TOP-STYLE=RIDGE,
BORDER-BOTTOM-STYLE=RIDGE,
BORDER-LEFT-STYLE=RIDGE,
BORDER-RIGHT-STYLE=RIDGE,
BORDER-TOP-COLOR='BLACK',
BORDER-BOTTOM-COLOR='BLACK',
BORDER-LEFT-COLOR='BLACK',
BORDER-RIGHT-COLOR='BLACK',
SIZE=9,
COLOR='WHITE',
BACKCOLOR=RGB(164 78 88),
STYLE=BOLD,
$
TYPE=TABHEADING,
SIZE=9,
STYLE=BOLD,
$
TYPE=TABFOOTING,
SIZE=9,
STYLE=BOLD,
$
TYPE=HEADING,
BORDER-TOP=OFF,
BORDER-BOTTOM=OFF,
BORDER-LEFT=OFF,
BORDER-RIGHT=OFF,
BORDER-TOP-STYLE=RIDGE,
BORDER-BOTTOM-STYLE=RIDGE,
BORDER-LEFT-STYLE=RIDGE,
BORDER-RIGHT-STYLE=RIDGE,
BORDER-TOP-COLOR='WHITE',
BORDER-BOTTOM-COLOR='WHITE',
BORDER-LEFT-COLOR='WHITE',
BORDER-RIGHT-COLOR='WHITE',
SIZE=12,
BACKCOLOR='WHITE',
STYLE=BOLD,
JUSTIFY=CENTER,
$
TYPE=HEADING,
LINE=1,
JUSTIFY=LEFT,
$
TYPE=FOOTING,
BORDER-TOP=OFF,
BORDER-BOTTOM=OFF,
BORDER-LEFT=OFF,
BORDER-RIGHT=OFF,
BORDER-TOP-STYLE=DOTTED,
BORDER-BOTTOM-STYLE=DOTTED,
BORDER-LEFT-STYLE=DOTTED,
BORDER-RIGHT-STYLE=DOTTED,
BORDER-TOP-COLOR='WHITE',
BORDER-BOTTOM-COLOR='WHITE',
BORDER-LEFT-COLOR='WHITE',
BORDER-RIGHT-COLOR='WHITE',
BACKCOLOR='WHITE',
STYLE=BOLD,
$
TYPE=SUBHEAD,
SIZE=9,
STYLE=BOLD,
$
TYPE=SUBFOOT,
BORDER-TOP=OFF,
BORDER-BOTTOM=OFF,
BORDER-LEFT=OFF,
BORDER-RIGHT=OFF,
BORDER-TOP-STYLE=RIDGE,
BORDER-BOTTOM-STYLE=RIDGE,
BORDER-LEFT-STYLE=RIDGE,
BORDER-RIGHT-STYLE=RIDGE,
BORDER-TOP-COLOR='WHITE',
BORDER-BOTTOM-COLOR='WHITE',
BORDER-LEFT-COLOR='WHITE',
BORDER-RIGHT-COLOR='WHITE',
SIZE=9,
BACKCOLOR='WHITE',
STYLE=BOLD,
$
TYPE=SUBTOTAL,
SIZE=8,
STYLE=BOLD,
$
TYPE=ACROSSVALUE,
SIZE=8,
STYLE=BOLD,
$
TYPE=ACROSSTITLE,
SIZE=8,
STYLE=BOLD,
$
TYPE=GRANDTOTAL,
SIZE=9,
STYLE=BOLD,
$
TYPE=REPORT,
COLUMN=N12,
SQUEEZE=1.180556,
$
TYPE=REPORT,
COLUMN=N3,
SQUEEZE=0.527778,
$
TYPE=REPORT,
COLUMN=N4,
SQUEEZE=1.625000,
$
TYPE=REPORT,
COLUMN=N5,
SQUEEZE=1.000000,
$
TYPE=REPORT,
COLUMN=N6,
SQUEEZE=1.000000,
$
TYPE=REPORT,
COLUMN=N7,
SQUEEZE=1.305556,
$
TYPE=REPORT,
COLUMN=N8,
SQUEEZE=1.402778,
$
TYPE=REPORT,
COLUMN=N9,
SQUEEZE=1.180556,
$
TYPE=REPORT,
COLUMN=N10,
SQUEEZE=1.180556,
$
TYPE=REPORT,
COLUMN=N11,
SQUEEZE=1.250000,
$
ENDSTYLE
END
This message has been edited. Last edited by: Kerry,
If this were a simple call EX fex2 X=&X where the value of &X includes a leading quote, .QUOTEDSTRING would be essential: without it, the generated code is ... EX fex2 X='A1' OR 'A2' OR 'A3' ... and the leading quote is taken to be a value-delimiter, rather than part of the value, and a FOC293 results:
EX fex2 Y1='A1' OR 'A2' OR 'A3'
-RUN
0 ERROR AT OR NEAR LINE 8 IN PROCEDURE FEX1 FOCEXEC *
(FOC293) MISSING OR MISPLACED QUOTE IN THE FOCEXEC ARGUMENT LINE:
I expect the same considerations apply to arguments in a drilldown. If so, the posted code was right, just IBI's handling is at fault.
The simplest work-around is to transform the quotes to something else (maybe ~ or æ or ") using CTRAN, for the drilldown call, and reverse the transformation on the receiving side. (This is akin to Susannah's advice in a post some weeks ago.)
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
Beg to differ. The value of &AFDELING in the parent fex does not include the delimiting quotes, and does not have doubled quotes. (They are dropped in execution of the -DEFAULT, same as in -SET --- Marcel added the -DEFAULT to simulates a multi-value call to the parent fex from its launch-page, and the simulation is accurate.)
As the query noted, the parent fex, which receives the &var with the OR'ed list of quoted values, works correctly, but the child fex (when invoked by the drilldown declared in the parent) errors out.
I'll use var to represent &AFDELING. A -? & in the parent fex will show it has
&var: 'A1' OR 'A2' OR 'A3'
(otherwise the parent report would bomb) and the developer needs to arrange things so that the same value is propogated to &var in the child fex.
I pointed out that the drilldown declaration in the parent cannot be
... var=&var ...
(sans .QUOT), which expands to
... var='A1' OR 'A2' OR 'A3' ...
It needs to be (and was)
... var=&var.QUOTEDSTRING ...
which expands to
... var='''A1'' OR ''A2'' OR ''A3''' ...
That should in turn establish the variable as
&var: 'A1' OR 'A2' OR 'A3'
in the child --- and it would if IBI's server left the string '''A1'' OR ''A2'' OR ''A3''' as-is, as the RHS of either "EX fexname var=RHS" or "-SET &var=RHS;.
But it doesn't, which is a bug in IBI's handling of the drilldown declared with
... var='''A1'' OR ''A2'' OR ''A3''' ...
--- apparently some link in the chain (probably the standard drilldown JavaScript in the parent report) transforms the value, stripping out the outermost pair of quotes, but leaving the doubled quotes as is.This message has been edited. Last edited by: j.gross,
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
I understand what you are saying Jack but quoted string is not meant to handle 'A' OR 'B' OR 'C', BUT having generated a simple example IT is the only way to pass it.
Solution is to replace the '' with ' in the called fex.
Calling fex -DEFAULTH &VAR = '''ENGLAND'' OR ''FRANCE'' OR ''W GERMANY''' TABLE FILE CAR PRINT COUNTRY ON TABLE SET STYLE * TYPE=DATA, COLUMN=N1, DRILLMENUITEM='drill', FOCEXEC=test02(COUNTRY=&VAR.QUOTEDSTRING), TARGET='_blank', $ END
Called fex -SET &COUNTRYX = STRREP(&COUNTRY.LENGTH, &COUNTRY, 2, '''''''', 1, '''', &COUNTRY.LENGTH, 'A&COUNTRY.LENGTH') ; TABLE FILE CAR PRINT COUNTRY WHERE COUNTRY EQ &COUNTRYX END
Autoprompt performs properly. Simple drilldowns perform properly, handling quotes within the &var value gracefully. The bug is in the drill-menu feature.
JG's example
-DEFAULTH &VAR = '''ENGLAND'' OR ''FRANCE'' OR ''W GERMANY'''
TABLE FILE CAR
PRINT COUNTRY
ON TABLE SET STYLE *
TYPE=DATA,
COLUMN=N1,
DRILLMENUITEM='drill',
FOCEXEC=fex2(X=&VAR.QUOTEDSTRING),
TARGET='_blank',
$
END
Thanks all for your respons. We found the reason why it went wrong. The solutions you suggested are right, but in this case I agree with J. Gross: it fails when you pass multiple values of a variable IN COMBINATION with the use of a multiple drill down.
This is not the case when I strip the procedure or replace it by a single drill down. It seems that the multiple drill downn window starts a script which places quotes around the multiple values you try to pass. Of course I could strip the extra quotes, but an adjustment of this script would be very helpful in the next release :-)
For now we decided to work with the plain old good working single drill down. Thanks again all!
I don't think the js functions per se are implicated; the library files are fine. It's the Agent software that generates javascript expressions with incorrect sequences of (escaped) quotes in the function arguments.
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
I had a fex bomb when performing a drilldown from it with a multiselected variable. I forgot aout the ".QUOTEDSTRING". It bombed quite nicely without the it.
I posted the following code as a recursive drilldown to itself just for instructional purposes.
-* MultiSelectDrillDownTest.fex
-DEFAULT &OUTFORMAT = 'HTML' ;
-DEFAULT &COUNTRY = FOC_NONE ;
-DEFAULT &CAR = FOC_NONE ;
-DEFAULT &MODEL = FOC_NONE ;
-DEFAULT &RANDOM = '&TOD.EVAL' ;
-SET &ECHO = ALL ;
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
-* Skip the Drilldown heading for PDF.
-IF &OUTFORMAT EQ 'PDF' THEN GOTO NODRILLDOWN1 ;
"Download to PDF"
-NODRILLDOWN1
"CARS, As of: &DATEMTDYY @ &TOD (&OUTFORMAT &RANDOM)"
"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='NAVY', STYLE=NORMAL,$
TYPE=DATA, BACKCOLOR=( RGB(202 202 230) 'WHITE' ),$
TYPE=TITLE, STYLE=BOLD,$
-* Skip the Drilldown, we've already done that.
-IF &OUTFORMAT EQ 'PDF' THEN GOTO NODRILLDOWN2 ;
TYPE=HEADING, LINE=1,
FOCEXEC=app/MultiSelectDrillDownTest.fex( \
OUTFORMAT='PDF' \
COUNTRY= &COUNTRY.QUOTEDSTRING \
CAR= &CAR.QUOTEDSTRING \
MODEL= &MODEL.QUOTEDSTRING \
RANDOM= '&TOD' ),$
-NODRILLDOWN2
ENDSTYLE
END
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005