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     [CLOSED] Convenient way to re-use drilldown parameters?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Convenient way to re-use drilldown parameters?
 Login/Join
 
Virtuoso
posted
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 :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Master
posted Hide Post
Sure...

-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.

We've made it even worse ;-)

-SET &DRILL_OPTION1 = 'DRILLMENUITEM=''Name the drill'', FOCEXEC=' | &DRILL_PROCEDURE | '( ' | &MDL_DRILL_DATA.QUOTEDSTRING | ' ),';


G'luck
* not at work this afternoon


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Platinum Member
posted Hide Post
I don't know how complex your code gets, but could you write them out to a file and just include them where you want them?
  
-DEFAULT &PARAM1 = 1;
-DEFAULT &PARAM2 = 2;
-DEFAULT &PARAM3 = 3;
-DEFAULT &PARAM4 = 4;

FILEDEF PARAM DISK PARAM.MAS
-RUN
-WRITE PARAM FILE=PARAM,SUFFIX=FIX,$ 
-WRITE PARAM SEGNAME=PARAM, $
-WRITE PARAM FIELDNAME=PARAM, USAGE=A100,ACTUAL=A100, $
-*
FILEDEF PARAM DISK PARAM.FTM
-RUN
-REPEAT :loop FOR &i FROM 1 TO 4
-SET &P='PARAM'||&i||'=&|PARAM'||&i||'.QUOTEDSTRING \';

-WRITE PARAM &P
-:loop
-RUN
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( \
-INCLUDE PARAM
  COUNTRY=COUNTRY \
  LANGUAGE='Italien' \
 ),
 DRILLMENUITEM='Menu 2',
 FOCEXEC=CAR_MENU2( \
-INCLUDE PARAM
  COUNTRY=COUNTRY \
  LANGUAGE='Italien' \
 ),
$
TYPE=DATA, COLUMN=FRENCHCARS,
 DRILLMENUITEM='Menu 1',
 FOCEXEC=CAR_MENU1( \
-INCLUDE PARAM
  COUNTRY=COUNTRY \
  LANGUAGE='French' \
 ),
 DRILLMENUITEM='Menu 2',
 FOCEXEC=CAR_MENU2( \
-INCLUDE PARAM
  COUNTRY=COUNTRY \
  LANGUAGE='French' \
 ),
$
-* Etc...
END


WF 7.6.11
Output: HTML, PDF, Excel
 
Posts: 123 | Location: UK | Registered: October 09, 2003Report This Post
Virtuoso
posted Hide Post
No need to create a master for an include file, Tewy Wink
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 Wink


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 :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report 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     [CLOSED] Convenient way to re-use drilldown parameters?

Copyright © 1996-2020 Information Builders