## com.crystaldecisions.sdk.occa.report.data
Interface IParameterField

All Superinterfaces:
  IField

All Known Implementing Classes:
  ParameterField

public interface IParameterField
extends IField

This interface is used to get and set values for the parameter field. Parameters prompt the user of a report to enter information.

Think of a parameter as a question that the user needs to answer before the report is generated. The information users enter, or the way they respond, determines what appears in the report. For example, in a report used by sales people, there might be a parameter that asks the user to choose a region. The report would return the results for the specific region instead of returning the results for all of the regions.

By using parameter fields in formulas, selection formulas, and in the report itself, you can create a single report that you can modify whenever your needs change. Parameter fields can also be used in subreports. Parameter values are discrete or ranged. A discrete value represents a particular, single value, while a range value represents a value between a certain range. Additionally, parameters can have one value (discrete or ranged) or multiple values (discrete or ranged).

The `ParameterField` object allows you to manipulate a parameter in the report.

Method Summary
`boolean` | `getAllowCustomCurrentValues()` Returns `true` if the user can enter custom values for a parameter when the report is refreshed and `false` otherwise.
`boolean` | `getAllowMultiValue()` Returns `true` whether the user can select more than one value for a parameter when the report is refreshed; returns `false` if the user can only choose one value for the parameter.
`boolean` | `getAllowNullValue()` Returns `true` if the value for the parameter may be `null` and `false` otherwise.
`IField` | `getBrowseField()` Returns the database field whose values are being used as default values for the parameter.
`Values` | `getCurrentValues()` Returns the values that are currently being used for the parameter.
`ParameterDefaultValueDisplayType` | `getDefaultValueDisplayType()` For internal use only.
`Values` | `getDefaultValues()` Returns the default values that may be used for the parameter.
`ParameterSortMethod` | `getDefaultValueSortMethod()` Returns whether the default values are sorted by value or by the value's description.
`ParameterSortOrder` | `getDefaultValueSortOrder()` Returns the manner in which the values or the values' descriptions are sorted.
`java.lang.String` | `getEditMask()` Returns the edit mask for the parameter values.
`IParameterFieldDiscreteValue` | `getMaximumValue()` Returns the maximum value the parameter can have, providing that a minimum value is also specified.
`IParameterFieldDiscreteValue` | `getMinimumValue()` Returns the minimum value the parameter can have, providing that a maximum value is also specified.
`ParameterFieldType` | `getParameterType()` Returns how the parameter is being used--that is, its type.
`java.lang.String` | `getReportName()` Returns the name of the report to which the parameter belongs.
`ParameterValueRangeKind` | `getValueRangeKind()` Returns whether the parameter is discrete, ranged, or both.
`Values` | `getValues()` Returns the current values for the parameter, or the default values if no current values are defined.
`void` | `setAllowCustomCurrentValues(boolean allowCustomCurrentValues)` Sets if the user can enter custom values for a parameter when the report is refreshed.
`void` | `setAllowMultiValue(boolean allowMultiValue)` Sets whether the user can select more than one value for a parameter when the report is refreshed.
`void` | `setAllowNullValue(boolean allowNullValue)` Set to `true` if the value for the parameter may be `null` and `false` otherwise.
`void` | `setBrowseField(IField browseField)` Sets the database field whose values are being used as default values for the parameter.
`void` | `setCurrentValues(Values currentValues)` Sets the values that are currently being used for the parameter.
`void` | `setDefaultValueDisplayType(ParameterDefaultValueDisplayType type)` For internal use only.
`void` | `setDefaultValues(Values defaultValues)` Sets the default values that may be used for the parameter.
`void` | `setDefaultValueSortMethod(ParameterSortMethod defaultValueSortMethod)` Sets whether the default values are sorted by value or by the value's description.
`void` | `setDefaultValueSortOrder(ParameterSortOrder defaultValueSortOrder)` Sets the manner in which the values or the values' descriptions are sorted.
`void` | `setEditMask(java.lang.String editMask)` Sets the edit mask for the parameter values.
`void` | `setMaximumValue(IParameterFieldDiscreteValue maximumValue)` Sets the maximum value the parameter can have, providing that a minimum value is also specified.
`void` | `setMinimumValue(IParameterFieldDiscreteValue minimumValue)` Sets the minimum value the parameter can have, providing that a maximum value is also specified.
`void` | `setParameterType(ParameterFieldType parameterType)` Sets how the parameter is being used--that is, its type.
`void` | `setReportName(java.lang.String reportName)` Sets the name of the report to which the parameter belongs.
`void` | `setValueRangeKind(ParameterValueRangeKind valueRangeKind)` Sets whether the parameter is discrete, ranged, or both.

Methods inherited from interface com.crystaldecisions.sdk.occa.report.data.IField
`getDescription, getDisplayName, getFormulaForm, getHeadingText, getIsRecurring, getKind, getLength, getLongName, getName, getShortName, getType, setDescription, setHeadingText, setLength, setName, setType`

Method Detail

### getBrowseField

    public IField getBrowseField()

  Returns the database field whose values are being used as default values for the parameter. This is used for UI-display purposes.

  Returns:
    The database field whose values are being used as default values for the parameter as an `IField` interface.

### setBrowseField

    public void setBrowseField(IField browseField)

  Sets the database field whose values are being used as default values for the parameter. This is used for UI-display purposes.

  Parameters:
    `browseField` - The database field whose values are being used as default values for the parameter as an `IField` interface.

### getAllowMultiValue

    public boolean getAllowMultiValue()

  Returns `true` whether the user can select more than one value for a parameter when the report is refreshed; returns `false` if the user can only choose one value for the parameter.

  Returns:
    `true` if the user can select more than one value for a parameter when the report is refreshed, and `false` otherwise.

### setAllowMultiValue

    public void setAllowMultiValue(boolean allowMultiValue)

  Sets whether the user can select more than one value for a parameter when the report is refreshed.

  Parameters:
    `allowMultiValue` - `true` if the user can select more than one value for a parameter when the report is refreshed, and `false` otherwise.

### getReportName

    public java.lang.String getReportName()

  Returns the name of the report to which the parameter belongs. This string is empty if the parameter belongs in a main report; if the parameter is contained in a subreport, this contains the name of the subreport.

  Returns:
    The name of the report as a `String`.

### getDefaultValueDisplayType

    public ParameterDefaultValueDisplayType getDefaultValueDisplayType()

  For internal use only.

### setReportName

    public void setReportName(java.lang.String reportName)

  Sets the name of the report to which the parameter belongs. This string is empty if the parameter belongs in a main report; if the parameter is contained in a subreport, this contains the name of the subreport.

  Parameters:
    `reportName` - The name of the report as a `String`. Set this string as empty if the parameter belongs in a main report; if the parameter is contained in a subreport, set this to contain the name of the subreport.

### getParameterType

    public ParameterFieldType getParameterType()

  Returns how the parameter is being used--that is, its type.

  Returns:
    The parameter field type as a `ParameterFieldType` object.

### setParameterType

    public void setParameterType(ParameterFieldType parameterType)

  Sets how the parameter is being used--that is, its type.

  Parameters:
    `parameterType` - The parameter field type as a `ParameterFieldType` object.

### getAllowNullValue

    public boolean getAllowNullValue()

  Returns `true` if the value for the parameter may be `null` and `false` otherwise. This is used only for stored SQL procedures.

  Returns:
    `true` if the value for the parameter may be `null`, and `false` otherwise.

### setAllowNullValue

    public void setAllowNullValue(boolean allowNullValue)

  Set to `true` if the value for the parameter may be `null` and `false` otherwise. This is used only for stored SQL procedures.

  Parameters:
    `allowNullValue` - `true` if the value for the parameter may be `null`, and `false` otherwise.

### getMinimumValue

    public IParameterFieldDiscreteValue getMinimumValue()

  Returns the minimum value the parameter can have, providing that a maximum value is also specified.

  If the parameter is discrete, the discrete values must be between the minimum and maximum values. If the parameter has a range limit, both the maximum and minimum values are defined. The BeginValue and/or EndValue of each ranged value must be between the minimum and maximum values.

  If the parameter is a number, this property represents the smallest allowable number the parameter may have. If it is a string, this is the minimum length the string may be. If it is a Date/Time value, this is the earliest date and time the parameter may be. This property does not apply to Boolean values.

  Returns:
    The `IParameterFieldDiscreteValue` object.

### setMinimumValue

    public void setMinimumValue(IParameterFieldDiscreteValue minimumValue)

  Sets the minimum value the parameter can have, providing that a maximum value is also specified.

  If the parameter is discrete, the discrete values must be between the minimum and maximum values. If the parameter has a range limit, both the maximum and minimum values are defined. The BeginValue and/or EndValue of each ranged value must be between the minimum and maximum values.

  If the parameter is a number, this property represents the smallest allowable number the parameter may have. If it is a string, this is the minimum length the string may be. If it is a Date/Time value, this is the earliest date and time the parameter may be. This property does not apply to Boolean values.

  Parameters:
    `minimumValue` - The `IParameterFieldDiscreteValue` object.

### getMaximumValue

    public IParameterFieldDiscreteValue getMaximumValue()

  Returns the maximum value the parameter can have, providing that a minimum value is also specified.

  If the parameter is discrete, the discrete values must be between the minimum and maximum values. If the parameter has a range limit, both the maximum and minimum values are defined. The BeginValue and/or EndValue of each ranged value must be between the minimum and maximum values.

  If the parameter is a number, this property represents the largest allowable number the parameter may have. If it is a string, this is the maximum length the string may be. If it is a Date/Time value, this is the earliest date and time the parameter may be. This property does not apply to Boolean values.

  Returns:
    The `IParameterFieldDiscreteValue` object.

### setMaximumValue

    public void setMaximumValue(IParameterFieldDiscreteValue maximumValue)

  Sets the maximum value the parameter can have, providing that a minimum value is also specified.

  If the parameter is discrete, the discrete values must be between the minimum and maximum values. If the parameter has a range limit, both the maximum and minimum values are defined. The BeginValue and/or EndValue of each ranged value must be between the minimum and maximum values.

  If the parameter is a number, this property represents the largest allowable number the parameter may have. If it is a string, this is the maximum length the string may be. If it is a Date/Time value, this is the earliest date and time the parameter may be. This property does not apply to Boolean values.

  Parameters:
    `maximumValue` - The `IParameterFieldDiscreteValue` object.

### getEditMask

    public java.lang.String getEditMask()

  Returns the edit mask for the parameter values. This is used for UI-display purposes. The edit mask can be any of a set of masking characters used to restrict the values you can enter as parameter values. The edit mask also limits the values you can enter as default prompting values.

  Note: The value of the edit mask is not checked if you use the SDK to change parameter values. You must check to ensure that any values the user enters respect the edit mask. If a user enters an invalid value according to the edit mask, it will not be possible to view or schedule the report.

  The edit mask follows the following guidelines:

  - "A" (allows an alphanumeric character and requires the entry of a character in the parameter value)
  - "a" (allows an alphanumeric character and does not require the entry of a character in the parameter value)
  - "0" (allows a digit [0 to 9] and requires the entry of a character in the parameter value)
  - "9" (allows a digit or a space, and does not require the entry of a character in the parameter value)
  - "#" (allows a digit, space, or plus/minus sign, and does not require the entry of a character in the parameter value)
  - "L" (allows a letter [A to Z], and requires the entry of a character in the parameter value)
  - "?" (allows a letter, and does not require the entry of a character in the parameter value)
  - "&" (allows any character or space, and requires the entry of a character in the parameter value)
  - "C" (allows any character or space, and does not require the entry of a character in the parameter value)
  - ". , : ; - /" (separator characters). Inserting separator characters into an Edit Mask is something like hard coding the formatting for the parameter field. When the field is placed on the report, the separator character will appear in the field object frame, like this: LLLL/0000. This example depicts an edit mask that requires four letters followed by four numbers.
  - "<" (causes subsequent characters to be converted to lowercase)
  - ">" (causes subsequent characters to be converted to uppercase)
  - "\" (causes the subsequent character to be displayed as a literal). For example, the edit mask "\A" would display a parameter value of "A." If the edit mask is "00\A00," then a valid parameter value would consist of two digits, the letter "A," and then two additional digits.
  - "Password". Allows you to set the edit mask to "Password." You can create conditional formulas that specify that certain sections of the report become visible only when certain user passwords are entered.

  Note: Some of the edit mask characters require that you enter a character in their place (when entering a parameter value), while others allow you to leave a space, if needed. For example, if the edit mask is 000099, you can enter a parameter value with four digits, five digits, or six digits, since the '9' edit mask character does not require the entry of a character. However, since '0' does require such an entry, you could not enter a parameter value with less than four digits.

  Returns:
    The edit mask as a `String`.

### setEditMask

    public void setEditMask(java.lang.String editMask)

  Sets the edit mask for the parameter values. This is used for UI-display purposes. The edit mask can be any of a set of masking characters used to restrict the values you can enter as parameter values. The edit mask also limits the values you can enter as default prompting values.

  Note: The value of the edit mask is not checked if you use the SDK to change parameter values. You must check to ensure that any values the user enters respect the edit mask. If a user enters an invalid value according to the edit mask, it will not be possible to view or schedule the report.

  The edit mask follows the following guidelines:

  - "A" (allows an alphanumeric character and requires the entry of a character in the parameter value)
  - "a" (allows an alphanumeric character and does not require the entry of a character in the parameter value)
  - "0" (allows a digit [0 to 9] and requires the entry of a character in the parameter value)
  - "9" (allows a digit or a space, and does not require the entry of a character in the parameter value)
  - "#" (allows a digit, space, or plus/minus sign, and does not require the entry of a character in the parameter value)
  - "L" (allows a letter [A to Z], and requires the entry of a character in the parameter value)
  - "?" (allows a letter, and does not require the entry of a character in the parameter value)
  - "&" (allows any character or space, and requires the entry of a character in the parameter value)
  - "C" (allows any character or space, and does not require the entry of a character in the parameter value)
  - ". , : ; - /" (separator characters). Inserting separator characters into an edit mask is something like hard coding the formatting for the parameter field. When the field is placed on the report, the separator character will appear in the field object frame, like this: LLLL/0000. This example depicts an edit mask that requires four letters followed by four numbers.
  - "<" (causes subsequent characters to be converted to lowercase)
  - ">" (causes subsequent characters to be converted to uppercase)
  - "\" (causes the subsequent character to be displayed as a literal). For example, the edit mask "\A" would display a parameter value of "A." If the edit mask is "00\A00," then a valid parameter value would consist of two digits, the letter "A," and then two additional digits.
  - "Password". Allows you to set the edit mask to "Password." You can create conditional formulas that specify that certain sections of the report become visible only when certain user passwords are entered.

  Note: Some of the edit mask characters require that you enter a character in their place (when entering a parameter value), while others allow you to leave a space, if needed. For example, if the Edit Mask is 000099, you can enter a parameter value with four digits, five digits, or six digits, since the '9' edit mask character does not require the entry of a character. However, since '0' does require such an entry, you could not enter a parameter value with less than four digits.

  Parameters:
    `editMask` - The edit mask as a `String`.

### getAllowCustomCurrentValues

    public boolean getAllowCustomCurrentValues()

  Returns `true` if the user can enter custom values for a parameter when the report is refreshed and `false` otherwise. If this property is `true`, users can enter any value for the parameter. If it is `false`, they must choose from one of the default values.

  Returns:
    `true` if the user can enter custom values for a parameter when the report is refreshed, and `false` otherwise.

### setAllowCustomCurrentValues

    public void setAllowCustomCurrentValues(boolean allowCustomCurrentValues)

  Sets if the user can enter custom values for a parameter when the report is refreshed. If this property is `true`, users can enter any value for the parameter. If it is `false`, they must choose from one of the default values.

  Parameters:
    `allowCustomCurrentValues` - `true` if the user can enter custom values for a parameter when the report is refreshed, and `false` otherwise.

### getDefaultValueSortOrder

    public ParameterSortOrder getDefaultValueSortOrder()

  Returns the manner in which the values or the values' descriptions are sorted.

  Returns:
    The manner in which the values or the values' descriptions are sorted as a `ParameterSortOrder` object.

### setDefaultValueSortOrder

    public void setDefaultValueSortOrder(ParameterSortOrder defaultValueSortOrder)

  Sets the manner in which the values or the values' descriptions are sorted.

  Parameters:
    `defaultValueSortOrder` - The manner in which the values or the values' descriptions are sorted as a `ParameterSortOrder` object.

### setDefaultValueDisplayType

    public void setDefaultValueDisplayType(ParameterDefaultValueDisplayType type)

  For internal use only.

### getDefaultValueSortMethod

    public ParameterSortMethod getDefaultValueSortMethod()

  Returns whether the default values are sorted by value or by the value's description. This is used for UI-display purposes.

  Returns:
    Whether the default values are sorted by value or by the value's description as a `ParameterSortMethod` object.

### setDefaultValueSortMethod

    public void setDefaultValueSortMethod(ParameterSortMethod defaultValueSortMethod)

  Sets whether the default values are sorted by value or by the value's description. This is used for UI-display purposes.

  Parameters:
    `defaultValueSortMethod` - Whether the default values are sorted by value or by the value's description as a `ParameterSortMethod` object.

### getValueRangeKind

    public ParameterValueRangeKind getValueRangeKind()

  Returns whether the parameter is discrete, ranged, or both.

  Returns:
    Whether the parameter is discrete, ranged, or both as a `ParameterValueRangeKind` object.

### setValueRangeKind

    public void setValueRangeKind(ParameterValueRangeKind valueRangeKind)

  Sets whether the parameter is discrete, ranged, or both.

  Parameters:
    `valueRangeKind` - Whether the parameter is discrete, ranged, or both as a `ParameterValueRangeKind` object.

### getCurrentValues

    public Values getCurrentValues()

  Returns the values that are currently being used for the parameter. To permanently set this value, a Report Application Server is required. Please consult the Crystal Reports for BEA WebLogic Workshop Developer's Guide for more information.

  Returns:
    The current values as a `Values` object.

### getDefaultValues

    public Values getDefaultValues()

  Returns the default values that may be used for the parameter.

  Returns:
    The default values that may be used for the parameter as a `Values` object.

### getValues

    public Values getValues()

  Returns the current values for the parameter, or the default values if no current values are defined. This is equivalent to the `getCurrentValues()` method unless it is empty, in which case it is equivalent to the `getDefaultValues()` method.

  Returns:
    The values as a `Values` object.

### setCurrentValues

    public void setCurrentValues(Values currentValues)

  Sets the values that are currently being used for the parameter. To permanently set this value, a Report Application Server is required. Please consult the Crystal Reports for BEA WebLogic Workshop Developer's Guide for more information.

  Parameters:
    `currentValues` - The current values as a `Values` object.

### setDefaultValues

    public void setDefaultValues(Values defaultValues)

  Sets the default values that may be used for the parameter.

  Parameters:
    `defaultValues` - The default values that may be used for the parameter as a `Values` object.