/*** Altering TITLES prior to Release 6.11 ***/ %eis; %eisentry appllst erc 8; INIT: date=put(today(),worddate18.); call execcmd("setwname 'Business Report for "|| left(date)||"'"); return; /*** Altering TITLES in Release 6.10 ***/ %eis; %eisentry appllst erc 8; INIT: erc=1; date=put(today(),worddate18.); appllst=setnitemc(appllst,'Business Report for '|| left(date), 'TITLE1',1); return; /*** Overriding the FILL method to alter the TITLE in a 3D Business Graph ***/ FILL: method appllst erc 8; date=put(today(),worddate18.); call send(_self_,'_SET_TITLE_',1, 'Business Report for '|| left(date)); endmethod; /*** Altering Titles for the Multidimensional Report ***/ length title $ 200; drill: method; frameid=getnitemn(_self_,'frameid'); call send(frameid,'_get_widget_','obj1',objectid); titleid=getnitemn(objectid,'title'); call send(titleid,'_is_hidden_',hidden); if hidden then return; drills=getniteml(_self_,'dimsubset'); do i=1 to listlen(drills); name=nameitem(drills,i); list=getiteml(drills,i); val=getitemc(list,1); title=title||' '||name||'='||val; end; call send(titleid,'_set_line_',title,2); endmethod; length title $ 200 name $ 8; navigate: method direction $ optional=table_name active_var next_var hierarchy $ drill_path 8 mb $; frameid=getnitemn(_self_,'frameid'); call send(frameid,'_get_widget_','obj1',objectid); titleid=getnitemn(objectid,'title'); call send(titleid,'_is_hidden_',hidden); if hidden then return; activevar=getnitemc(_self_,'activevar'); drills=getniteml(_self_,'dimsubset'); stopit: do; title=''; do i=1 to listlen(drills) until(name=activevar); name=nameitem(drills,i); if name=activevar then leave stopit; list=getiteml(drills,i); val=getitemc(list,1); title=title||' '||name||'='||val; end; call send(titleid,'_set_line_',title,2); end; endmethod; /*** Defining and Querying Commands ***/ /*** The PMENU code ***/ proc pmenu c=sasuser.override; menu mymenu; item HOTSPOT; item NOTES; item BOOKMARK; item REPORT; item GOBACK; item HELP; run; /*** The Selection Action method to query the command ***/ /*** Prior to Release 6.11 ***/ %eis; %eisentry appllst erc 8; INIT: erc=1; cmd=getnitemc(appllst,'COMMAND'); if upcase(cmd)='REPORT' then call fsview('sasuser.class'); return; /*** Overriding the GETCMD method to query the command ***/ /*** in Release 6.11 ***/ %eis; length kbname $ 17 kbdsid 8 applds $ 17 appldsid 8 text1 text2 $ 200 num1 num2 8; GETCMD: method command $ appllst 8 ; if upcase(command)='REPORT' then call display('sashelp.eis.runeis.program',&eparmlst, 'sasuser.override.extview.fileview',rc); endmethod; /*** Subsetting Data Prior to Executing the Object ***/ /*** data set to register ***/ data work.houses; set sasuser.houses (obs=0); run; /*** Display Initilization Prior to Release 6.11 ***/ %eis; %eisentry appllst erc 8; INIT: dsid=open('sasuser.houses'); stylelist=makelist(); nlevel=0; rc=lvarlevel(dsid,'style',nlevel,stylelist); rc=sortlist(stylelist,'ascending'); dsid=close(dsid); return; SELECT: item=popmenu(stylelist); if item then style=getitemc(stylelist,item); return; OK: if style ne _blank_ then do; submit continue; data work.houses; set sasuser.houses; where style="&style"; run; endsubmit; call execcmd('end'); end; else _msg_='Please select a style.'; return; /*** Overriding the FILL method in Release 6.11 ***/ FILL: method appllst erc 8; call display('sasuser.override.subset.frame'); endmethod; /*** Displaying Custom Information in a Desktop Object ***/ /*** The INIT method for the Graphic Text subclass ***/ INIT: call super(_self_,'_INIT_'); _value_=trim(putn(today(),'weekdate.')); return; /*** Using Hotspots to allow subsets of data to be presented ***/ /*** The Selection Action method code ***/ %eis; %eisentry appllst rc 8; length state $2; MAIN: state=getnitemc(appllst,'HOTSPOT'); if state in ('WA' 'CA' 'TX' 'FL' 'NC' 'NY') then call fsview("sasuser.sales(where=(state="|| quote(state)||"))"); return;