|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface IParameterField
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). Parameter fields can also be set as optional.
The ParameterField object allows you to manipulate
a parameter in the report.
| Method Summary | |
|---|---|
void |
enablePromptWithDescriptionOnly(boolean enable)
For internal use only |
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 if 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()
Returns the default value display type. |
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.util.List |
getDirectPrerequisiteParameterNames()
For internal use only |
java.lang.String |
getEditMask()
Returns the edit mask for the parameter values. |
Values |
getInitialValues()
For internal use only |
ParameterInitialValuesFunction |
getInitialValuesFunction()
For internal use only |
boolean |
getIsAllowHierarchyValues()
For internal use only |
boolean |
getIsDataFoundationParameter()
For internal use only |
boolean |
getIsDataParameter()
For internal use only |
boolean |
getIsEditableOnPanel()
Gets whether the parameter is editable on viewer parameter panel. |
boolean |
getIsKeepLastValueSelected()
For internal use only |
boolean |
getIsLinkedParameter()
For internal use only |
boolean |
getIsOptionalPrompt()
Gets whether the parameter is optional. |
boolean |
getIsPromptToUser()
For internal use only |
boolean |
getIsShownOnPanel()
Gets whether the parameter is shown on the viewer parameter panel. |
ILOVInfo |
getLOVInfo()
For internal use only |
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 as a type value. |
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. |
boolean |
isPromptWithDescriptionOnlyEnabled()
For internal use only |
void |
setAllowCustomCurrentValues(boolean allowCustomCurrentValues)
Sets if the user can enter custom values for a parameter when the report is refreshed. |
void |
setAllowHierarchyValues(boolean allowHierarchyValues)
For internal use only |
void |
setAllowMultiValue(boolean allowMultiValue)
Sets if 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)
Sets the default value display type of the parameter. |
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 |
setDirectPrerequisiteParameterNames(java.util.List newPrerequisiteParameterNames)
For internal use only |
void |
setEditMask(java.lang.String editMask)
Sets the edit mask for the parameter values. |
void |
setInitialValues(Values initialValues)
For internal use only |
void |
setInitialValuesFunction(ParameterInitialValuesFunction function)
For internal use only |
void |
setIsEditableOnPanel(boolean isEditableOnPanel)
Sets whether the parameter is editable on viewer parameter panel. |
void |
setIsOptionalPrompt(boolean isOptional)
Sets whether the parameter is optional. |
void |
setIsShownOnPanel(boolean isShownOnPanel)
Sets whether the parameter is shown on the viewer parameter panel. |
void |
setKeepLastValueSelected(boolean keepLastValueSelected)
For internal use only |
void |
setLOVInfo(ILOVInfo lovInfo)
For internal use only. |
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 as a type value. |
void |
setPromptToUser(boolean promptToUser)
For internal use only. |
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, getValueTypeForFormatOption, setDescription, setHeadingText, setLength, setName, setType |
| Method Detail |
|---|
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.
true if the user can enter
custom values for a parameter
when the report is refreshed, and false otherwise.boolean getAllowMultiValue()
Returns true if 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.
true if the user
can select more than one value for a parameter when
the report is refreshed, and false otherwise.boolean getAllowNullValue()
Returns true if the value for the parameter may be NULL
and false otherwise.
This is used only for stored SQL procedures.
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. This is used for UI-display purposes.
IField interface.Values getCurrentValues()
Returns the values that are currently being used
for the parameter. Use the
ParameterFieldController.setCurrentValues(String, String, Object[])
method to set the current values.
Values object.ParameterDefaultValueDisplayType getDefaultValueDisplayType()
Returns the default value display type.
ParameterDefaultValueDisplayType object.Values getDefaultValues()
Returns the default values that may be used for the parameter.
Values object.ParameterSortMethod getDefaultValueSortMethod()
Returns whether the default values are sorted by value or by the value's description. This is used for UI-display purposes.
ParameterSortMethod object.ParameterSortOrder getDefaultValueSortOrder()
Returns the manner in which the values or the values' descriptions are sorted.
ParameterSortOrder object.java.util.List getDirectPrerequisiteParameterNames()
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:
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.
String.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.
IParameterFieldDiscreteValue object.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.
IParameterFieldDiscreteValue object.ParameterFieldType getParameterType()
Returns how the parameter is being used as a type value.
ParameterFieldType object.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.
String.ParameterValueRangeKind getValueRangeKind()
Returns whether the parameter is discrete, ranged, or both.
ParameterValueRangeKind object.Values getValues()
Returns the current values for the parameter, or the default
values if no current values are defined.
This is equivalent to the IParameterField.getCurrentValues() method
unless it is empty, in which case it is equivalent
to the IParameterField.getDefaultValues() method.
Values object.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.
allowCustomCurrentValues - true if the user can enter
custom values for a parameter
when the report is refreshed, and false otherwise.void setAllowMultiValue(boolean allowMultiValue)
Sets if the user can select more than one value for a parameter when the report is refreshed.
allowMultiValue - true if the user
can select more than one value for a parameter when
the report is refreshed, and false otherwise.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.
allowNullValue - 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. This is used for UI-display purposes.
browseField - The database field whose values are being used as
default values for the parameter as an IField interface.void setCurrentValues(Values currentValues)
Sets the values that are currently being used
for the parameter. Use the
ParameterFieldController.setCurrentValues(String, String, Object[])
method to set the current values.
currentValues - The current values as a Values object.void setDefaultValueDisplayType(ParameterDefaultValueDisplayType type)
Sets the default value display type of the parameter.
type - the default value display type as a ParameterDefaultValueDisplayType objectvoid setDefaultValues(Values defaultValues)
Sets the default values that may be used for the parameter.
defaultValues - The default values that may be used for the parameter
as a Values object.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.
defaultValueSortMethod - Whether the default values are sorted by value
or by the value's description as a
ParameterSortMethod object.void setDefaultValueSortOrder(ParameterSortOrder defaultValueSortOrder)
Sets the manner in which the values or the values' descriptions are sorted.
defaultValueSortOrder - The manner in which the values or the values'
descriptions are sorted as a ParameterSortOrder object.void setDirectPrerequisiteParameterNames(java.util.List newPrerequisiteParameterNames)
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:
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.
editMask - The edit mask as a String.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.
maximumValue - The IParameterFieldDiscreteValue object.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.
minimumValue - The IParameterFieldDiscreteValue object.void setParameterType(ParameterFieldType parameterType)
Sets how the parameter is being used as a type value.
parameterType - The parameter field type as a
ParameterFieldType object.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.
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.void setValueRangeKind(ParameterValueRangeKind valueRangeKind)
Sets whether the parameter is discrete, ranged, or both.
valueRangeKind - Whether the parameter is discrete, ranged, or both
as a ParameterValueRangeKind object.boolean getIsOptionalPrompt()
Gets whether the parameter is optional.
Optional parameter prompts do not require a parameter value to be provided. No visual cue in the parameter dialog indicates that a parameter is optional; however, the report designer may add custom text to the prompt text indicating it is optional.
If an optional parameter prompt is given a Values collection whose “IsNoValue” property is set to true, the user will not be prompted to enter a value.
true if the parameter is optional.getIsNoValue(),
setIsNoValue()void setIsOptionalPrompt(boolean isOptional)
Sets whether the parameter is optional.
Optional parameter prompts do not require a parameter value to be provided. No visual cue in the parameter dialog indicates that a parameter is optional; however, the report designer may add custom text to the prompt text indicating it is optional.
If an optional parameter prompt is given a Values collection whose “IsNoValue” property is set to true, the user will not be prompted to enter a value.
isOptional - booleangetIsNoValue(),
setIsNoValue()boolean isPromptWithDescriptionOnlyEnabled()
void enablePromptWithDescriptionOnly(boolean enable)
boolean getIsShownOnPanel()
Gets whether the parameter is shown on the viewer parameter panel.
true if the parameter is shown on panel.void setIsShownOnPanel(boolean isShownOnPanel)
Sets whether the parameter is shown on the viewer parameter panel.
isShownOnPanel - booleanboolean getIsEditableOnPanel()
Gets whether the parameter is editable on viewer parameter panel.
true if the parameter is editable.void setIsEditableOnPanel(boolean isEditableOnPanel)
Sets whether the parameter is editable on viewer parameter panel.
isEditableOnPanel - booleanValues getInitialValues()
void setInitialValues(Values initialValues)
ILOVInfo getLOVInfo()
boolean getIsLinkedParameter()
boolean getIsDataParameter()
ParameterInitialValuesFunction getInitialValuesFunction()
boolean getIsPromptToUser()
boolean getIsAllowHierarchyValues()
boolean getIsDataFoundationParameter()
boolean getIsKeepLastValueSelected()
void setAllowHierarchyValues(boolean allowHierarchyValues)
void setInitialValuesFunction(ParameterInitialValuesFunction function)
void setKeepLastValueSelected(boolean keepLastValueSelected)
void setPromptToUser(boolean promptToUser)
void setLOVInfo(ILOVInfo lovInfo)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||