Here are the steps for creating or updating the parameters:
- In the SAP Crystal Reports window, bring up the Field Explorer panel by selecting the View menu > select Field Explorer.
- In the Field Explorer panel on the right, right-click on Field Parameters > Select New.
- The Create New Parameters window will appear. In this window, you can define the parameter name, type, and value.
Note: After you add a parameter, you cannot change the name, but you can edit the type and values.
PARAMETER TYPE
The following table provides a list of parameter types (Type dropdown list) and related control types in SAP Business One:
Parameter Type | Control Type | Values |
Boolean | Checkbox | Fixed Values :
|
Currency | Edit box with calculator | N/A |
Date | Calender-type date picker; that is, an edit box with calender | N/A |
Date Time | Calender-type date picker; that is, an edit box with calender | Note: Because SAP Business One doesn’t have a time control, this parameter provides a default time of 00:00 |
Number | Edit box with calculator | N/A |
String | Edit box | N/A |
Time | Not Supported | N/A |
LIST OF VALUES
Value list types can be defined as Static or Dynamic.
- Static
This is the recommended option. A static prompt is a prompt that always contains the same value. For example, if a parameter requests a country value, you can create a static prompt because the country list contains sets of values that do not change frequently. When token syntax is applied to parameter names, option values are dynamically populated for these parameters.
The static options provide the following options:- Simple parameters (display options)
- A hardcoded list of values such as customers, vendors, and customers
- Complex dynamic values
- Dynamic
This option is not recommended. The values from the dynamic prompt are retrieved dynamically and directly from the data source and are not stored in the report. For example, if you ask for a customer name, you can create a dynamic prompt because the names in your customer database may change frequently.
When you set the List of Values type to Dynamic, the value area is not available, and you can retrieve data only by using the SQL code on the parameter name. Furthermore, static types with SQL tokens and statements provide a better way to get a list of options because the user can filter by adding a WHERE clause in SQL part of the name parameter.
VALUE AREA
The values you enter or import in the Value field appear for selection in the SAP Business One criteria selection window.
VALUE OPTIONS AND SETTINGS
In the Create New Parameter or Edit Parameter window, you can define the settings for the value options as shown in the table below.
Value Option | SAP Business One Type | Setting Descriptions |
Show on (Viewer) Panel | N/A | Determines the Parameter Panel options in SAP Crystal Reports viewer:
Do not show Editable (default) Read Only |
Prompt Text | N/A | Appears in the SAP Business One Control as a UI string providing an instruction to the user, such as “Enter a value.” |
Prompt with description only | N/A | Fixed Value:
True – Prompt the user with only a description False (Default) – Prompts the user with a value and its description |
Optional Prompt | N/A | Set this to True if you want to allow the user to bypass entering a value for this parameter |
Default value | N/A | Add a value to this field if you want a default to appear when the program prompts the user to select a value. If the user does not change it, the default value is applied.
Note: This option is available only for parameters with static prompts. |
Value Option | SAP Business One Type | Setting Descriptions |
Allow custom values | Not supported | N/A |
Allow multiple values | (…) [Browse] button that can pop up a new window to allow the user to select multiple values | Fixed values:
True False |
Allow discrete values | Dropdown list | A user can select only one singular value. If you have Allow multiple values set to True. A user is able to select more than one discrete value for the parameter field. thought these values will continue to function singularly as opposed to a range value. You can choose discrete values for this parameter field after you choose the Refresh Report Data command. Fixed values:
True False |
Allow range values | From/to fields | Fixed values:
True – Provides From and To dropdown lists False – Provides a Choose from List icon |
Min Length | N/A | Restricts values, depending on the type. For example, if the type is String, this value is Min Length. If the type is Date, Date time, or time, the value is Start. If the type is Number or Currency, the value is Min Value. |
Max Length | N/A | Restricts values, depending on the type. For example, if the type is String, this value is Max Length. If the type is Date, Date time, or time, the value is Start. If the type is Number or Currency, the value is Max Value. |
Edit Mask | N/A | Applicable only for the String parameter type. For more information, see the SAP Crystal Reports online help |
Also read: