Always the optimist, I was hoping to display the physical name of the fex I am running in the heading of a report. So I have tried this code:
TABLE FILE MMDB1
HEADING CENTER
" COUNT OF UNIT COORDINATORS "
" &FOCFEXNAME ROUTINE "
"REPORT: &FOCFOCEXEC -- EMPLOYEE SALARIES"
" &DATEMtrDYY "
The documentation states that if I am working in Devstudio MRE, these are the results I should expect:
&FOCFEXNAME (returns ADHOCRQ when open in editor, focexecname when not open) &FOCFOCEXEC (returns _ADHOCRQ when open in editor, _focexecname when not open) &FOCINCLUDE (returns ADHOCRQ when open in editor, focexecname when not open)
This is a sample of the standard heading code we use via a -INCLUDE after the report HEADING statement in our non-MRE report environment:
-DEFAULTS &IBIAPP_app = 'unknown'
-DEFAULTS &DSTJOBNAME = 'unknown'
-*
-SET &BEG_PGMNAME = IF (EDIT(&FOCFOCEXEC,'9$') EQ '_') THEN 2 ELSE 1 ;
-SET &END_PRGNAME = IF (&FOCFOCEXEC CONTAINS '.fex')
- THEN (POSIT(&FOCFOCEXEC,&FOCFOCEXEC.LENGTH,'.fex',4,'I3') - 1)
- ELSE &FOCFOCEXEC.LENGTH ;
-SET &PRGNAME_LEN = IF (EDIT(&FOCFOCEXEC,'9$') EQ '_') THEN (&END_PRGNAME - 1) ELSE &END_PRGNAME ;
-SET &RPT_PROGRAM = IF (&FOCFOCEXEC EQ 'RCASTER') THEN (&DSTJOBNAME || '.fex')
- ELSE &IBIAPP_app || '\' ||
- SUBSTR(&FOCFOCEXEC.LENGTH,&FOCFOCEXEC,&BEG_PGMNAME,&END_PRGNAME,&PRGNAME_LEN,'A&PRGNAME_LEN.EVAL') || '.fex';
-*
-SET &RPT_DATE_TEXT = 'Report Date: ' | &DATEMDYY ;
-SET &RPT_ID_TEXT = 'Program='|| &RPT_PROGRAM || ', Department=<hard-coded name of support department for report>';
-*
"&RPT_DATE_TEXT.EVAL"
"&RPT_ID_TEXT.EVAL"
WebFOCUS 7.7.05
April 02, 2018, 09:28 AM
Ron Hansard
Variables like &FOCFOCEXEC are sometimes not exposed to the report server, so when you used them you don't get squat. You can access the administrative console under application settings and custom settings and expose any system variable you want.