Focal Point
[SOLVED] DRILLMENUITEM behavior inconsistent

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

November 29, 2012, 09:36 AM
Tomsweb
[SOLVED] DRILLMENUITEM behavior inconsistent
I have created a HTML splash page showing Work Orders which were opened in the
last 30 days. There are two kinds here, CUSTOMER WORK ORDERS and just WORK ORDERS.

quote:

OPEN WORK ORDER FOR LAST <= 30 DAYS
CUSTOMER ORDERS AND WORK ORDERS
DATE: November 29, 2012

OPEN CUSTOMER ORDERS


WDC WORKDESC # of
Orders
224 TURN ON 6
209 INSPECT FOR VALVE LEAK 4
223 TURN OFF FOR REPAIRS 2
041 AIR IN LINE 1
108 INSPECT FOR SEWER LEAK 1
405 REPLACE METER COVER 1

OPEN WORK ORDERS


WDC WORKDESC # of
Orders
303 CURB STOP INOPERABLE 4
258 LOCATE/ADJUST VALVE BOX 3
200 SHUT DOWN/CHARGE WTR MAIN 2
406 REPLACE METER F&C 2
017 MISC WATER MAINT 1
058 REINSPECT FOR SERVICE LEAK 1
293 REPAIR FH LEAD VALVE LEAK 1
425 VALVE WORK ON LARGE METER-01 1



By clicking on the '223' value the user can create a detail report for all '223'
work orders.


These drill links are code w/ DRILLMENUITEM and I have coded the hover text to be:
'OPEN WORK ORDERS' for a detail open work order report, and 'OPEN CUSTOMER ORDERS'
for a detail customer work order report.

However, when I scroll the mouse over the links the hover text 'OPEN WORK ORDERS',
displays for records in OPEN CUSTOMER ORDERS as it does for those OPEN WORK ORDERS.
In addition, clicking on a WDC in either section will run the same focexec.

I can get this to work for the ALT tag, but I like the 'dressed up' hover cloud you
get from the DRILLMENUITEM tag.

Has anyone had this problem?

Here is my code:

-SET &ECHO = ALL;

SET HOLDLIST = PRINTONLY, ASNAMES = ON
-SET &XAGE = 30;

DEFINE FILE MMDB1
TDATE/YYMD = &YYMD;
IDATE/I8YYMD = EDIT(RECDTE);
DYMD/YMD = IDATE;
DYYMD/YYMD = DYMD;
AGEDIF/YYMD = DATEADD(TDATE, 'D', -&XAGE.EVAL);
DIFF/I8 = DATEDIF(DYMD, TDATE, 'D');
END

TABLE FILE MMDB1
PRINT
WDC
WORKDESC
DYMD
STATUS
COMPUTE ORDST/A1 = 'O';
BY ASSIGNEE
WHERE STATUS EQ 'O';
WHERE DYYMD GE AGEDIF;
WHERE ASSIGNEE EQ 'SM09';
IF RECORDLIMIT EQ 15
ON TABLE HOLD AS SPL1
END
-RUN

TABLE FILE SPL1
COUNT WDC AS 'OWDC'
BY ASSIGNEE
BY WDC
BY WORKDESC
BY ORDST
ON TABLE HOLD AS SPL2
END
-RUN

DEFINE FILE MMDBCRX
TDATE/YYMD = &YYMD;
IDATE/I8YYMD = EDIT(RECDTE);
DYMD/YMD = IDATE;
DYYMD/YYMD = DYMD;
AGEDIF/YYMD = DATEADD(TDATE, 'D', -&XAGE.EVAL);
DIFF/I8 = DATEDIF(DYMD, TDATE, 'D');
END

TABLE FILE MMDBCRX
PRINT
WDC
WORKDESC
DYMD
STATUS
COMPUTE ORDST/A1 = 'C';
BY ASSIGNEE

WHERE SRCWORKRQ EQ 'C';
WHERE DYYMD GE AGEDIF;
WHERE ASSIGNEE EQ 'SM09';
IF RECORDLIMIT EQ 15
ON TABLE HOLD AS SPLA
END
-RUN

TABLE FILE SPLA
COUNT WDC AS 'CWDC'
BY ASSIGNEE
BY WDC
BY WORKDESC
BY ORDST
ON TABLE HOLD AS SPLB
END
-RUN

DEFINE FILE SPLB
OWDC/I5 = CWDC ;
END

TABLE FILE SPL2
PRINT *
ON TABLE HOLD AS OCSPL
MORE
FILE SPLB
END
-RUN

?FF OCSPL
-RUN

DEFINE FILE OCSPL
DLT/A2 = '<=';
ASGST/A30 = IF ORDST EQ 'C' THEN 'OPEN CUSTOMER ORDERS'
                            ELSE 'OPEN WORK ORDERS';
END

-*SET COMPOUND='OPEN NOBREAK'

TABLE FILE OCSPL
HEADING
" OPEN WORK ORDER FOR LAST <DLT &XAGE.EVAL DAYS "
" CUSTOMER ORDERS AND WORK ORDERS "
" DATE: &DATEMtrDYY "
" "
" <ASGST "
" "
SUM OWDC AS '# of,Orders'
BY ASGST NOPRINT
BY HIGHEST OWDC NOPRINT
BY ASSIGNEE NOPRINT
BY WDC
BY WORKDESC
BY ORDST NOPRINT
WHERE ORDST EQ 'C';
ON TABLE SET PAGE NOPAGE
ON TABLE PCHOLD FORMAT HTML OPEN NOBREAK
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
LEFTMARGIN=0.00000,
RIGHTMARGIN=0.00000,
TOPMARGIN=0.00000,
BOTTOMMARGIN=0.00000,
$
TYPE=REPORT,
GRID=OFF,
FONT=ARIAL,
SIZE=10,
STYLE=NORMAL,
ORIENTATION=PORTRAIT,
$
TYPE=DATA,
COLOR=BLACK,
SIZE=9,
STYLE=NORMAL,
$
TYPE=DATA,
COLUMN=N4,
COLOR=GREEN,
SIZE=10,
STYLE=UNDERLINE,
WHEN=ORDST EQ 'C',
DRILLMENUITEM='Open Customer Orders - RPT11',
  FOCEXEC=app/rpt11(ASGX=ASSIGNEE WDCX=WDC AGEX='&AGEX'),
$
TYPE=HEADING,
FONT=ARIAL,
COLOR=BLUE,
SIZE=10,
STYLE=BOLD,
JUSTIFY=CENTER,
$
ENDSTYLE
END
-RUN

-*SET COMPOUND='OPEN NOBREAK'

TABLE FILE OCSPL
HEADING
" "
" <ASGST "
" "
SUM OWDC AS '# of,Orders'
BY ASGST NOPRINT
BY HIGHEST OWDC NOPRINT
BY ASSIGNEE NOPRINT
BY WDC
BY WORKDESC
BY ORDST NOPRINT
WHERE ORDST EQ 'O';
ON TABLE SET PAGE NOPAGE
ON TABLE PCHOLD FORMAT HTML CLOSE
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
LEFTMARGIN=0.00000,
RIGHTMARGIN=0.00000,
TOPMARGIN=0.00000,
BOTTOMMARGIN=0.00000,
$
TYPE=REPORT,
GRID=OFF,
FONT=ARIAL,
SIZE=10,
STYLE=NORMAL,
ORIENTATION=PORTRAIT,
$
TYPE=DATA,
COLOR=BLACK,
SIZE=9,
STYLE=NORMAL,
$
TYPE=DATA,
COLUMN=N4,
COLOR=GREEN,
SIZE=10,
STYLE=UNDERLINE,
WHEN=ORDST EQ 'O',
DRILLMENUITEM='Open Work Orders - RPT01',
FOCEXEC=app/rpt01(ASGX=ASSIGNEE WDCX=WDC AGEX='&AGEX'),
$
TYPE=HEADING,
FONT=ARIAL,
COLOR=BLUE,
SIZE=10,
STYLE=BOLD,
JUSTIFY=CENTER,
$
ENDSTYLE
END

-RUN

This message has been edited. Last edited by: Tomsweb,


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
November 29, 2012, 01:19 PM
Tony A
quote:
'Open Work Orders - RPT01'

It is because you are using two html outputs each with a drillitem coded.

When you code a drillitem, a pice of javascript gets embeded within your output, to control the drill menu. Within a report the counting of the drill menu item will always begin at the beginning (naturally) and therefore ecah of your outputs will have the same javascript reference. Your output is only refering to the latter of the two javscript sections.

You'll either need to consolodate your output into one html (I know that you've tried this and it causes other problems) or grow your own code.

Good luck

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
November 29, 2012, 01:27 PM
Tomsweb
As we know DRILLMENUITEM only works with HTML format. So this issue is another reason it is
perhaps better to use ALT=. A plus is that you can also use ALT if you're planning to move
along to pdf and graphs.

Thanks Tony.


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
November 29, 2012, 02:59 PM
Tony A
I would be inclined to change the links to JAVASCRIPT and then HOLD the two tables as HTMTABLE, bringing them together in an HTMLFORM with included JavaScript function. You could also then place them side by side without too much effort.

If you include JQuery then the control of the javascript call becomes easier and you could use a <div> to hold the hover text.

edited to add picture sample



T

This message has been edited. Last edited by: Tony A,



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10