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'm in the middle of creating a report where I have to repeat a certain set of drilldown parameters a lot, and it's a relatively large amount of parameters including some -REPEAT logic for multi-valued parameters.
Now I wonder whether anyone has found a way to deal with such that's more convenient than copy/pasting the whole bunch (and editing the -REPEAT labels to prevent accidental infinite loops!)?
For a somewhat simplified (i.e. no multi-valued params) example:
-DEFAULT &PARAM1 = 1;
-DEFAULT &PARAM2 = 2;
-DEFAULT &PARAM3 = 3;
-DEFAULT &PARAM4 = 4;
DEFINE FILE CAR
ITALIENCARS/D12SC = IF COUNTRY EQ 'ITALY' THEN 1 ELSE 0;
FRENCHCARS/D12SC = IF COUNTRY EQ 'FRANCE' THEN 1 ELSE 0;
GERMANCARS/D12SC = IF COUNTRY EQ 'GERMANY' THEN 1 ELSE 0;
JAPANESECARS/D12SC = IF COUNTRY EQ 'JAPAN' THEN 1 ELSE 0;
ENGLISHCARS/D12SC = IF COUNTRY EQ 'ENGLAND' THEN 1 ELSE 0;
END
TABLE FILE CAR
SUM
ITALIENCARS
FRENCHCARS
GERMANCARS
JAPANESECARS
ENGLISHCARS
BY COUNTRY
ON TABLE SET STYLE *
$
TYPE=DATA, COLUMN=ITALIENCARS,
DRILLMENUITEM='Menu 1',
FOCEXEC=CAR_MENU1( \
PARAM1=&PARAM1.QUOTEDSTRING \
PARAM2=&PARAM2.QUOTEDSTRING \
PARAM3=&PARAM3.QUOTEDSTRING \
PARAM4=&PARAM4.QUOTEDSTRING \
COUNTRY=COUNTRY \
LANGUAGE='Italien' \
),
DRILLMENUITEM='Menu 2',
FOCEXEC=CAR_MENU2( \
PARAM1=&PARAM1.QUOTEDSTRING \
PARAM2=&PARAM2.QUOTEDSTRING \
PARAM3=&PARAM3.QUOTEDSTRING \
PARAM4=&PARAM4.QUOTEDSTRING \
COUNTRY=COUNTRY \
LANGUAGE='Italien' \
),
$
TYPE=DATA, COLUMN=FRENCHCARS,
DRILLMENUITEM='Menu 1',
FOCEXEC=CAR_MENU1( \
PARAM1=&PARAM1.QUOTEDSTRING \
PARAM2=&PARAM2.QUOTEDSTRING \
PARAM3=&PARAM3.QUOTEDSTRING \
PARAM4=&PARAM4.QUOTEDSTRING \
COUNTRY=COUNTRY \
LANGUAGE='French' \
),
DRILLMENUITEM='Menu 2',
FOCEXEC=CAR_MENU2( \
PARAM1=&PARAM1.QUOTEDSTRING \
PARAM2=&PARAM2.QUOTEDSTRING \
PARAM3=&PARAM3.QUOTEDSTRING \
PARAM4=&PARAM4.QUOTEDSTRING \
COUNTRY=COUNTRY \
LANGUAGE='French' \
),
$
-* Etc...
END
This message has been edited. Last edited by: <Kathryn Henning>,
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :
-SET &DRILL_DATA = ''
-IF &PARAM_1 NE '' THEN CONTINUE ELSE GOTO NO_PARAM_1;
-SET &DRILL_DATA = &DRILL_DATA.QUOTEDSTRING | 'PARAM_1=&PARAM_1.EVAL ';
-NO_PARAM_1
-IF &PARAM_2 NE '' THEN CONTINUE ELSE GOTO NO_PARAM_2;
-SET &DRILL_DATA = &DRILL_DATA.QUOTEDSTRING | 'PARAM_2=&PARAM_2.EVAL ';
-NO_PARAM_2
etc. for all paramters ( mind the 'space' between EVAL and end of string ! )
FOCEXEC=WHERE_EVER ( &DRILL_DATA.QUOTEDSTRING ),
Just snippets from a way larger code. Not checked.
No need to create a master for an include file, Tewy I don't really like creating files for things like this though, that seems excessive - I'd rather perform such operations in memory.
Dave's solution looks better to me and that's the direction I was thinking as well. I guess I was hoping for a lighter solution, as the assignments to the parameter tend to get a bit cumbersome. I tend to moving the conditions into the assignment, but perhaps that's actually more cumbersome than (conditionally) jumping over them.
What I was sort of hoping for was a modifiable list of report input parameters that we could pass on to a drilldown. Remove a few parameters you don't need, add a few specific to the drilldown and dump the result into a FOCEXEC call and done. That looks like it'd be possible to write a procedure or two to manage that, provided we could get to the list of URL query-parameters somehow...
Yeah, I'd automate my mother given the chance
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :