At 01:38 PM 10/14/2010, Jason Kramer wrote:
I have a CFA that takes one parameter. I know that I can call it
from within an EEP using:
PROPERTY RBASE_FORM_ACTION myCFM 'USING myparam'
I would prefer to call it using the EEPs tab of the control since
the only piece of code in
the custom EEP would be the line above (and a RETURN). Is there a
way to pass a parameter
to a CFA using the Custom Form Action section of the EEPs tab?
I am using 9.0 x64 update 4
Jason,
Yes, you can pass parameter(s) that can be used in Custom Form Actions.
For example, if your custom action prints a report based on a
"reportname" and "outputformat",
in your EEP, you would pass both parameters as follows:
-- Button EEP
PROPERTY RBASE_FORM_ACTION 'MyPRINTCommand' 'USING Invoice PDF'
RETURN
-- Custom Form Action
-- MyPRINTCommand
-- Required Parameters (vReportName, vReportOutPut)
SET VAR vReportName = .%1
SET VAR vReportOutPut = .%2
SET VAR vReportWhereClause = 'WHERE COUNT = 1'
SWITCH (.vReportOutput)
CASE 'SCREEN'
SET VAR vReportOption = 'OPTION SCREEN|Window_State MAXIMIZED'
SET VAR vReportFileName = NULL
SET VAR vReportParameters = NULL
SET VAR vReportShow = NULL
BREAK
CASE 'PRINTER'
SET VAR vReportOption = 'OPTION PRINTER'
SET VAR vReportFileName = NULL
SET VAR vReportParameters = NULL
SET VAR vReportShow = NULL
BREAK
CASE 'BMP'
SET VAR vReportOption = 'OPTION BMP'
SET VAR vReportFileName = (.vReportName+'.BMP')
SET VAR vReportParameters = ('|FILENAME'&.vReportFileName+ +
'|BACKGROUND_COLOR WHITE|BACKGROUND_TYPE TILE')
SET VAR vReportShow = '|OPEN ON'
BREAK
CASE 'EMF'
SET VAR vReportOption = 'OPTION EMF'
SET VAR vReportFileName = (.vReportName+'.EMF')
SET VAR vReportParameters = ('|FILENAME'&.vReportFileName+ +
'|BACKGROUND_COLOR WHITE|BACKGROUND_TYPE TILE')
SET VAR vReportShow = '|OPEN ON'
BREAK
CASE 'GIF'
SET VAR vReportOption = 'OPTION GIF'
SET VAR vReportFileName = (.vReportName+'.GIF')
SET VAR vReportParameters = ('|FILENAME'&.vReportFileName+ +
'|BACKGROUND_COLOR WHITE|BACKGROUND_TYPE TILE')
SET VAR vReportShow = '|OPEN ON'
BREAK
CASE 'HTML'
SET VAR vReportOption = 'OPTION HTML'
SET VAR vReportFileName = (.vReportName+'.HTM')
SET VAR vReportParameters = ('|FILENAME'&.vReportFileName+ +
'|BACKGROUND_COLOR WHITE')
SET VAR vReportShow = '|OPEN ON'
BREAK
CASE 'JPG'
SET VAR vReportOption = 'OPTION JPG'
SET VAR vReportFileName = (.vReportName+'.JPG')
SET VAR vReportParameters = ('|FILENAME'&.vReportFileName+ +
'|BACKGROUND_COLOR WHITE|BACKGROUND_TYPE TILE')
SET VAR vReportShow = '|OPEN ON'
BREAK
CASE 'PDF'
SET VAR vReportOption = 'OPTION PDF'
SET VAR vReportFileName = (.vReportName+'.PDF')
SET VAR vReportParameters = ('|FILENAME'&.vReportFileName+ +
'|BACKGROUND_COLOR WHITE|AUTHOR Your Name Here ...')
SET VAR vReportShow = '|OPEN ON'
BREAK
CASE 'RTF'
SET VAR vReportOption = 'OPTION RTF'
SET VAR vReportFileName = (.vReportName+'.RTF')
SET VAR vReportParameters = ('|FILENAME'&.vReportFileName+ +
'|BACKGROUND_COLOR WHITE|AUTHOR Your Name Here ...')
SET VAR vReportParameters = (.vReportParameters+ +
'|TITLE Your Report Title Here ...|SUBJECT Your Subject Here...')
SET VAR vReportShow = '|OPEN ON'
BREAK
CASE 'TIFF'
SET VAR vReportOption = 'OPTION TIFF'
SET VAR vReportFileName = (.vReportName+'.TIFF')
SET VAR vReportParameters = ('|FILENAME'&.vReportFileName+ +
'|COMPRESSION PACKBITS|MULTIPAGE OFF')
SET VAR vReportShow = '|OPEN ON'
BREAK
CASE 'WMF'
SET VAR vReportOption = 'OPTION WMF'
SET VAR vReportFileName = (.vReportName+'.WMF')
SET VAR vReportParameters = ('|FILENAME'&.vReportFileName+ +
'|BACKGROUND_COLOR WHITE|BACKGROUND_TYPE TILE')
SET VAR vReportShow = '|OPEN ON'
BREAK
CASE 'XLS'
SET VAR vReportOption = 'OPTION XLS'
SET VAR vReportFileName = (.vReportName+'.XLS')
SET VAR vReportParameters = ('|FILENAME'&.vReportFileName)
SET VAR vReportShow = '|OPEN ON'
BREAK
ENDSW
SET VAR vReportSyntax = +
('PRINT'&.vReportName&.vReportWhereClause&.vReportOption+.vReportParameters+.vReportShow)
&vReportSyntax
CLEAR VAR vReportName,vReportOutPut,vReportOption,vReportFileName, +
vReportParameters,vReportShow,1-%
RETURN
Hope that helps!
If you need a sample application to demonstrate the use of such
feature, feel free to
send me a private e-mail.
Very Best R:egards,
Razzak.
--- RBASE-L
================================================
TO POST A MESSAGE TO ALL MEMBERS:
Send a plain text email to [email protected]
(Don't use any of these words as your Subject:
INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH,
REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP)
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: INTRO
================================================
TO UNSUBSCRIBE:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: UNSUBSCRIBE
================================================
TO SEARCH ARCHIVES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: SEARCH-n
(where n is the number of days). In the message body,
place any
text to search for.
================================================