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] Adding a column value into the DRILLMENUITEM title

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[solved] Adding a column value into the DRILLMENUITEM title
 Login/Join
 
Guru
posted
I am trying to add the value that is in a column into the Title of the DRILLMENUITEM. I was able to put in a variable using the code below and it worked. I have tried
TYPE=DATA,
COLUMN=N5,
TARGET='_blank',
DRILLMENUITEM= '&SUB_NAME Today Detail',
FOCEXEC=daily_sales_detail_html( \
SEARCH_SUB=N1 \
),
$

This message has been edited. Last edited by: Jay Potter,


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
 
Posts: 341 | Location: Pembroke NH/Jericho NY | Registered: June 15, 2011Report This Post
Expert
posted Hide Post
It worked, well done.


Whats the problem ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Guru
posted Hide Post
Adding a variable worked, which was set before creating the report. But I want to be able to add the value of a column, so that the value that is in a column display in the menu title. It would change depending what row you are on.


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
 
Posts: 341 | Location: Pembroke NH/Jericho NY | Registered: June 15, 2011Report This Post
Expert
posted Hide Post
As far as I am aware, the Drill Menu Item does not accept any dynamic variables.

But...

You may be able to do this with javascript.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Expert
posted Hide Post
Here is a tossed together sample.

Not sure if it will work on all browsers or versions of WebFOCUS, I guess it would have to be tested.

-SET &RANDOM = &TOD ;

TABLE FILE CAR
PRINT COUNTRY
      CAR
      COMPUTE Drill1Text/A40 = 'Drill down to Country ' | COUNTRY ; NOPRINT
      COMPUTE Drill2Text/A40 = 'Drill down to Car ' | CAR ; NOPRINT
ON TABLE SET STYLE *
TYPE=DATA,
COLUMN=N1,TARGET='_self',
DRILLMENUITEM='MultiDrill 1',FOCEXEC=TEST(D1T=Drill1Text CTY=COUNTRY RANDOM='&RANDOM'),
DRILLMENUITEM='MultiDrill 2',FOCEXEC=TEST(D2T=Drill2Text CAR=CAR RANDOM='&RANDOM'),
$
ENDSTYLE
END
-HTMLFORM BEGIN
<script type="text/javascript">
< !--
  function DynoDrill(_I1a,_I1b,_I1c,_I2a,_I2b,_I2c) {
    MDitems[_I1a].text = _I1b.split('&')[0].split('=')[1] ;
    MDitems[_I2a].text = _I2b.split('&')[0].split('=')[1] ;
    MDitemClick(_I1a,_I1b,_I1c,_I2a,_I2b,_I2c);
  }
  var _LinkList = document.getElementsByTagName('A') ;
  for (var _Cntr = 0;_Cntr < _LinkList.length;_Cntr++) {
    var _NewLink = 'javascript:DynoDrill(' + _LinkList[_Cntr].href.toString().split('(',2)[1] ;
    _LinkList[_Cntr].href = _NewLink ;
  }
//-->
</script>
-HTMLFORM END


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Gold member
posted Hide Post
Hi,

You can also do this by conditionally creating the drilldowns with WHEN. The drilldowns are created in a loop and the value for each multidrill item is read from a SAVE file.

Cheers,
Mika

TABLE FILE CAR
BY COUNTRY
ON TABLE SAVE
END
-RUN
-SET &countryCNT = &LINES ;

TABLE FILE CAR
SUM SALES
    DEALER_COST
    RETAIL_COST
BY COUNTRY
ON TABLE SET STYLE *
-REPEAT :doDRILL FOR &i FROM 1 TO &countryCNT
-READ SAVE &CTRY.A10
TYPE=DATA,
     COLUMN=COUNTRY,
     WHEN = COUNTRY EQ '&CTRY',
-* Single Country
     DRILLMENUITEM='&CTRY - Detail Report',
         FOCEXEC=sales_detail( \
                 COUNTRY=COUNTRY \
           ),
     TARGET='_blank',
-* All Countries
     DRILLMENUITEM='All Countries - Detail Report',
         FOCEXEC=sales_detail(),
     TARGET='_blank',
$     
-:doDRILL
ENDSTYLE
END
-RUN


WebFOCUS 7.6.x
PMF 5.2.x
 
Posts: 58 | Location: Sydney, Australia | Registered: April 22, 2005Report This Post
Guru
posted Hide Post
I finally had the time to test Mika's code and incorporate it into my code which made my application look great.

Thanks


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
 
Posts: 341 | Location: Pembroke NH/Jericho NY | Registered: June 15, 2011Report 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] Adding a column value into the DRILLMENUITEM title

Copyright © 1996-2020 Information Builders