| Suntower 2006-07-14, 6:55 pm |
| I have an extension template that works on many reports in a given
module
like so...
#EXTENSION (ReportGetControls, 'Get Report Controls'), PROCEDURE,
REPORT,
FIRST, REQ(ReportOptionsWindow(SATemplates))
OK, I thought I could create a global extension template and use that
to
populate every report procedure that contained the other extension
ReportOptionsWindow (in the above REQ clause).
#EXTENSION (ReportGetControlsGlobal, 'Include Get Report Controls
Global'),
DESCRIPTION('Global Include For Get Report Controls'),
APPLICATION(ReportGetControls)
#DISPLAY('That's it!')
Is there a way to get the global extension to -only- add
ReportGetReportControls to procedures IF they contain the extension
template
ReportOptionsWindow ?
----I tried using #RESTRICT like so...
#EXTENSION (ReportGetControlsGlobal, 'Include Get Report Controls
Global'),
DESCRIPTION('Global Include For Get Report Controls'),
APPLICATION(ReportGetControls)
#DISPLAY('Placeholder')
#EXTENSION (ReportGetControls, 'Get Report Controls'), PROCEDURE,
REPORT,
FIRST
#RESTRICT
#FOR(%ActiveTemplate),WHERE(%ActiveTempl
ate='ReportOptionsWindow(SATemplates)')
#ACCEPT
#ENDFOR
#REJECT
#ENDRESTRICT
#PROMPT ('Include Code?', CHECK), %IncludeCode
#ATSTART
#DECLARE(%MyVarName)
#DECLARE(%xCounter)
#ENDAT
.....I thought that what would happen, when I attached
ReportGetControlsGlobal
to the Global Extensions list, would be that ReportGetControls would be
attached to all procedures BUT that no code would be generated unless
ReportOptionsWindow(SATemplates) was one of the templates in the
procedures.
But this did not happen. Instead, the code was inserted into every
procedure. What did I do wrong?
Thanks!
---JC
|