Focal Point
DRILLMENUITEM -Restrictions

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3341019942

October 03, 2007, 09:55 AM
<msam>
DRILLMENUITEM -Restrictions
Hi All,
I'm using DRILLMENUITEM option in the styling,but when I try to include morethan 5 parameters my drill option doesn't work,Can anyone suggest me the reason.

Regards,
MSAM
October 03, 2007, 10:01 AM
Francis Mariani
I think you may want to take a look at this:
olap on causes agent crash?

And, what version are you on? How about updating your signature?


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
October 03, 2007, 10:09 AM
<msam>
CAN YOU LET ME KNOW HOW TO UPDATE THE SIGNATURE..?
October 03, 2007, 10:41 AM
Tom Flynn
Toolbar above Topic
Click on GO
Personal Zone - Profile


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
October 03, 2007, 11:00 AM
GreenspanDan
i recently stumbled upon a DrillMenuItem limitation in Internet Explorer. Since IE has a built-in limitation of about 2000 characters for the max length of a URL, if your drillmenu has too many items, it eventually exceeds this length and the drillmenu will simply not show up when you click on it. How many items is dependent on how long your paramter strings are. for me, i was generally seeing it putter out around 30 items or so.

incidentally, Firefox does not have such a restriction, and can deal with a near-infinite number of menu items.


---------------------
WebFOCUS 7.6
October 03, 2007, 11:45 AM
Jason K.
if anyone figures this out I'll buy them lunch.

the olap and drillmenuitem just don't seem to work well together.

I'm just hoping that we can make this work on the IBM version of webfocus called webquery.


Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.
October 03, 2007, 12:55 PM
dhagen
You can actually fix the DRILLMENUITEM length problem. I built a prototype about a year ago that would re-write the javascript functions and insert my own. This allowed a user to code the multiple drills as per normal, and not have to worry about the too many items or length or whatever.

Unfortunately, I cannot find my prototype, and I cannot remember who I sent it tooFrowner If I can find it, I will post here.

If anyone want to try, the logic was pretty simple.
1) Create a JS file that would loop through the anchor tags.
2) Initialize an object for each drill menu item, and load all the key value pairs into the object.
3) Reset the menu items to call your own JS function to execute request.
4) Your new JS function would submit a form with all the values to appropriate target.
5) Include your JS file into your fex using the SET JSURL setting.

Any takers?


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
October 03, 2007, 12:58 PM
Francis Mariani
quote:
Unfortunately, I cannot find my prototype, and I cannot remember who I sent it to


dhagen, then it doesn't exist, does it? Big Grin


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
October 03, 2007, 01:04 PM
dhagen
I exists in my noodle ... if I just knew how to extract itWink I may have to enlist the help of my muse (aka beer).


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
October 03, 2007, 02:18 PM
susannah
MSAM, make sure 1) you have fewer than 12 DRILLMENUITEMS for one field, and 2) that your parameter names are as short as possible, and that you pass no long string values, just codes. Test your drilldown by first starting without any DRILLMENUITEMs... just an ordinary drilldown. Then turn that ordinary drilldown into a DRILLMENUITEM with only 1 choice (yes, that works), then add the rest 1 by 1, just like chemistry class, to see where it breaks.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
October 03, 2007, 02:52 PM
dhagen
Ok, this has not been completely tested, but whoever is interested can change the end result.

All this does is change the existing arguments in the drill options that contains all the key value pairs to a simple array of an array object. The following was done with 716. This is way simpler then what I suggested above.

Focexec with 48 drill items:
SET JSURL=/approot/baseapp/fixmultidrill.js
TABLE FILE CAR
SUM
     CNT.MODEL AS 'Models'
BY COUNTRY
HEADING
"DRILL START"
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     LEFTMARGIN=0.250000,
     RIGHTMARGIN=0.250000,
     TOPMARGIN=0.250000,
     BOTTOMMARGIN=0.250000,
     SQUEEZE=ON,
     ORIENTATION=LANDSCAPE,
$
TYPE=REPORT,
     FONT='ARIAL',
     SIZE=8,
     COLOR='BLACK',
     BACKCOLOR='NONE',
     STYLE=NORMAL,
     TOPGAP=0.013889,
     BOTTOMGAP=0.027778,
$
TYPE=DATA,
     BACKCOLOR=( 'WHITE' RGB(240 240 240) ),
$
TYPE=DATA,
     COLUMN=N1,
     DRILLMENUITEM='Drill 1',
          FOCEXEC=focalpoint_car_drillto_1(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 2',
          FOCEXEC=focalpoint_car_drillto_2(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL' THIS_TIME='&TOD.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 3',
          FOCEXEC=focalpoint_car_drillto_1(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 4',
          FOCEXEC=focalpoint_car_drillto_2(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL' THIS_TIME='&TOD.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 5',
          FOCEXEC=focalpoint_car_drillto_1(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 6',
          FOCEXEC=focalpoint_car_drillto_2(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL' THIS_TIME='&TOD.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 7',
          FOCEXEC=focalpoint_car_drillto_1(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 8',
          FOCEXEC=focalpoint_car_drillto_2(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL' THIS_TIME='&TOD.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 9',
          FOCEXEC=focalpoint_car_drillto_1(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 10',
          FOCEXEC=focalpoint_car_drillto_2(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL' THIS_TIME='&TOD.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 11',
          FOCEXEC=focalpoint_car_drillto_1(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 12',
          FOCEXEC=focalpoint_car_drillto_2(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL' THIS_TIME='&TOD.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 13',
          FOCEXEC=focalpoint_car_drillto_1(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 14',
          FOCEXEC=focalpoint_car_drillto_2(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL' THIS_TIME='&TOD.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 15',
          FOCEXEC=focalpoint_car_drillto_1(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 16',
          FOCEXEC=focalpoint_car_drillto_2(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL' THIS_TIME='&TOD.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 1',
          FOCEXEC=focalpoint_car_drillto_1(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 2',
          FOCEXEC=focalpoint_car_drillto_2(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL' THIS_TIME='&TOD.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 3',
          FOCEXEC=focalpoint_car_drillto_1(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 4',
          FOCEXEC=focalpoint_car_drillto_2(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL' THIS_TIME='&TOD.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 5',
          FOCEXEC=focalpoint_car_drillto_1(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 6',
          FOCEXEC=focalpoint_car_drillto_2(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL' THIS_TIME='&TOD.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 7',
          FOCEXEC=focalpoint_car_drillto_1(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 8',
          FOCEXEC=focalpoint_car_drillto_2(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL' THIS_TIME='&TOD.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 9',
          FOCEXEC=focalpoint_car_drillto_1(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 10',
          FOCEXEC=focalpoint_car_drillto_2(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL' THIS_TIME='&TOD.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 11',
          FOCEXEC=focalpoint_car_drillto_1(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 12',
          FOCEXEC=focalpoint_car_drillto_2(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL' THIS_TIME='&TOD.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 13',
          FOCEXEC=focalpoint_car_drillto_1(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 14',
          FOCEXEC=focalpoint_car_drillto_2(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL' THIS_TIME='&TOD.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 15',
          FOCEXEC=focalpoint_car_drillto_1(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 16',
          FOCEXEC=focalpoint_car_drillto_2(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL' THIS_TIME='&TOD.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 1',
          FOCEXEC=focalpoint_car_drillto_1(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 2',
          FOCEXEC=focalpoint_car_drillto_2(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL' THIS_TIME='&TOD.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 3',
          FOCEXEC=focalpoint_car_drillto_1(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 4',
          FOCEXEC=focalpoint_car_drillto_2(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL' THIS_TIME='&TOD.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 5',
          FOCEXEC=focalpoint_car_drillto_1(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 6',
          FOCEXEC=focalpoint_car_drillto_2(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL' THIS_TIME='&TOD.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 7',
          FOCEXEC=focalpoint_car_drillto_1(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 8',
          FOCEXEC=focalpoint_car_drillto_2(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL' THIS_TIME='&TOD.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 9',
          FOCEXEC=focalpoint_car_drillto_1(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 10',
          FOCEXEC=focalpoint_car_drillto_2(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL' THIS_TIME='&TOD.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 11',
          FOCEXEC=focalpoint_car_drillto_1(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 12',
          FOCEXEC=focalpoint_car_drillto_2(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL' THIS_TIME='&TOD.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 13',
          FOCEXEC=focalpoint_car_drillto_1(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 14',
          FOCEXEC=focalpoint_car_drillto_2(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL' THIS_TIME='&TOD.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 15',
          FOCEXEC=focalpoint_car_drillto_1(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL'),
          TARGET='_blank',
     DRILLMENUITEM='Drill 16',
          FOCEXEC=focalpoint_car_drillto_2(COUNTRY=N1 ANOTHER=N2 THIS_DATE='&DATE.EVAL' THIS_TIME='&TOD.EVAL'),
          TARGET='_blank',
$
TYPE=DATA,
     COLUMN=B*,
     STYLE=BOLD,
$
TYPE=TITLE,
     BORDER-TOP=OFF,
     BORDER-BOTTOM=LIGHT,
     BORDER-LEFT=OFF,
     BORDER-RIGHT=OFF,
     BORDER-BOTTOM-COLOR='SILVER',
     STYLE=BOLD,
$
TYPE=HEADING,
     SIZE=10,
     STYLE=BOLD,
$
TYPE=SUBTOTAL,
     STYLE=BOLD,
$
TYPE=ACROSSVALUE,
     STYLE=BOLD,
     JUSTIFY=CENTER,
$
TYPE=ACROSSTITLE,
     STYLE=BOLD,
     JUSTIFY=CENTER,
$
TYPE=GRANDTOTAL,
     STYLE=BOLD,
$
ENDSTYLE
END


/approot/baseapp/fixmultidrill.js
var kVP = new Array();
var kVC = 0;

function changeAllA() {
     
     var anchorList = document.getElementsByTagName("a");
     for (var i = 0; i < anchorList.length; i++) {
          var hrefBefore = anchorList[i].href;
          var remJSFunction = anchorList[i].href.substring(23, anchorList[i].href.length-2);
          var aSplit = remJSFunction.split(",");
          var k=0;
          kVP[kVC] = new Array();
          for (var j=1; j<aSplit.length; j+=3) {
               kVP[kVC][k] = aSplit[j].substring(1,aSplit[j].length-1);
               aSplit[j] = 'kVP[' + kVC + '][' + k++ + ']'; 
          }
          anchorList[i].href = "JavaScript:MDitemClick(";
          for (var j=0; j<aSplit.length; j++) {
               if (j == 0) {
                   anchorList[i].href += aSplit[j];
               } else {
                   anchorList[i].href += "," + aSplit[j];
               }
          }
          anchorList[i].href += ");"
          kVC++;
     }

}

if (window.addEventListener) {
	window.addEventListener('load', 'changeAllA', false);
} else if (window.attachEvent) {
	window.attachEvent('onload', changeAllA);
} else {
	alert("not supported");
}


I know its not the best code, but It's all I could do on short notice.

To test, run without the JSURL setting, then with.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
October 03, 2007, 03:21 PM
Francis Mariani
This will most likely fix Jason K's problem and he'll owe you big-time.

Could you explain in a nutshell what the JS function is doing?

Thanks very much,


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
October 03, 2007, 03:43 PM
dhagen
Sure, If you build a multi-drill, and do a view source, you'll notice that the anchor (drill down link) looks like the following:

<A HREF="javascript:MDitemClick(0,'COUNTRY=ENGLAND&ANOTHER=4&THIS_DATE=10/03/07','',
 ... ,47,'COUNTRY=ENGLAND&ANOTHER=4&THIS_DATE=10/03/07&THIS_TIME=15.28.52','');


The comma delimited values are broken down in groups of 3, where the first value is the drill down array number starting from 0 to the total number of drill items (48 - 1 in my case), the second value is the expanded key value pairs for the parameters that we added to the drill down link when we built it, and some third value that always seems to be blank.

All this JS is doing is:
1) retrieve the value for each href.
2) extract the key value pairings (or parameter names and values), and set the value of a multi-dimensional array to that key value pairing. kVP[x][y] is the multi-dimensional array that will contain now contain the values (e.g.
kVP[0][0] = 'COUNTRY=ENGLAND&ANOTHER=4&THIS_DATE=10/03/07'
).
3) rebuilding the href while substituting the key value parings to the multi-dimensional array, thereby making the entire href significantly smaller.

The end result is of the above href would be:

<A HREF="javascript:MDitemClick(0,kVP[0][0],'', ... ,47,kVP[0][47],'');


Does that help?


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
October 03, 2007, 05:26 PM
Francis Mariani
Yes, thanks very much. This should be exciting for those multidrilldowners out there.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
October 04, 2007, 07:46 AM
susannah
sweet!




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
October 04, 2007, 03:09 PM
Jason K.
It's a great idea, at least I think it is...I really dont' understand it. Wink
Thanks dhagen!

Unfortunately, it didn't keep mine from crashing, maybe I'm doing something wrong?

the first lines of my fex look like this now.
-SET &ECHO=ALL;
SET JSURL=/apps/baseapp/fixmultidrill.js
-DEFAULT &CHR = 'BYMONTH';

note, there's no dash on the set JSURL line.

I created the fixmultidrill.js in my baseapp directory...
Y:\ibi\apps\baseapp
fixmultidrill.js, and I just copy and pasted the code that dhagen posted. I didn't see anything that was specific to my system.

Did I do this right?


Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.
October 04, 2007, 03:34 PM
Francis Mariani
I'd stick a -RUN after SET JSURL, just in case...

SET JSURL=/apps/baseapp/fixmultidrill.js
-RUN



Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
October 04, 2007, 03:49 PM
dhagen
Jason,

If you are getting crashes, then this technique is not going to help with that. This technique cleans things up POST delivery. This technique was posted to help with the original question of this thread. Open a problem with CSS to see if they can help you with your crashing agent problem.

Sorry


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
October 04, 2007, 04:25 PM
Jason K.
dhagen:
check out case 22862032. opened it back on April 02.

We were excited about the code dhagen posted because when we delete all but 2 drilldowns, the .fex runs just fine.

Unfortunately, management wants the drilldowns AND the olap.

Thanks again for the help, I'm always taking any suggestions.

This message has been edited. Last edited by: Jason K.,


Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.