|
Visual Basic |
|
|
Dim parameterField As New ParameterField() |
|
|
C# |
|
|
ParameterField parameterField = new ParameterField(); |
|
|
Visual Basic |
|
|
parameterField.Description = "New string parameter" |
|
|
C# |
|
|
parameterField.Description = "New string parameter"; |
|
|
|
|
Not all types may be used for parameter fields. For example, you may not set Type to 20 (Bitmap). Use the isValidType method in the ParameterFieldController class to determine if a certain type is valid for a parameter field. |
|
Visual Basic |
|
|
parameterField.ParameterType = CrParameterFieldTypeEnum.crParameterFieldTypeReportParameter |
|
|
C# |
|
|
parameterField.ParameterType = CrParameterFieldTypeEnum.crParameterFieldTypeReportParameter; |
|
|
Visual Basic |
|
|
parameterField.Name = "NewParameter" |
|
|
C# |
|
|
parameterField.Name = "NewParameter"; |
|
|
|
|
When a parameter is added using the ParameterFieldController class, it is not placed on the report, and the user will not be prompted when the report is refreshed. To use the parameter field to prompt a user, the parameter must be used in a filter, or must be added using the ResultFieldController class. |
|
Visual Basic |
|
|
rcd.DataDefController.ParameterFieldController.Add(parameterField) |
|
|
C# |
|
|
rcd.DataDefController.ParameterFieldController.Add(parameterField); |
|
The following example defines a new, discrete, number parameter and adds it using the ParameterFieldController:
|
Visual Basic |
|
|
Private Sub AddParameterToReport(ByVal rcd As ISCDReportClientDocument) |
|
|
C# |
|
|
private void AddParameterToReport(ISCDReportClientDocument rcd) |
|
This list includes the namespaces used by the sample code:
© 2021 SAP AG. All rights reserved.
http://www.sap.com/sapbusinessobjects/
Support services
http://service.sap.com/bosap-support/
Created with the Personal Edition of HelpNDoc: Easy EBook and documentation generator