向集合添加 ParameterValue 对象。
[Visual Basic]
Public Overrideable Function Add( _ ByVal parameterValue As CrystalDecisions.Shared.ParameterValue _ ) As Integer
[C#]
public virtual int Add(
CrystalDecisions.Shared.ParameterValue parameterValue
);
参数
- parameterValue
这可能是以下类型之一:ParameterValue、ParameterRangeValue 或 ParameterDiscreteValue。
返回值
表示集合中 ParameterValue 的位置。
备注
对于此调用,参数使用 ParameterValues 对象以确定该参数字段是包含离散值、范围值还是二者都包含。然后,您可以使用 ParameterRangeValue 或 ParameterDiscreteValue 对象来设置参数值。
示例
该示例说明如何向 ParameterValues 集合添加值。此函数使用一个离散值和一个 ParameterValues 集合。它返回带有新添加值的 ParameterValues 集合。该示例中使用的是离散值;也可使用区域值。
[Visual Basic]
Private Function AddDiscreteValue(ByVal paramValue As String, _
ByVal paramValues As ParameterValues) As ParameterValues
Dim paramDiscreteValue As New ParameterDiscreteValue()
paramDiscreteValue.Value = paramValue
paramValues.Add(paramDiscreteValue)
AddDiscreteValue = paramValues
End Function
[C++]
static ParameterValues* AddDiscreetValue
(String* paramValue, ParameterValues* paramValues)
{
ParameterDiscreteValue* paramDiscreteValue = new
ParameterDiscreteValue ();
paramDiscreteValue->Value = paramValue;
paramValues->Add (paramDiscreteValue);
return paramValues;
};
[C#]
private ParameterValues AddDiscreetValue
(string paramValue, ParameterValues paramValues)
{
ParameterDiscreteValue paramDiscreteValue = new
ParameterDiscreteValue ();
paramDiscreteValue.Value = paramValue;
paramValues.Add (paramDiscreteValue);
return paramValues;
}
要求
程序集 CrystalDecisions.Shared (CrystalDecisions.Shared.dll)
请参见
ParameterValues 类 | ParameterValues 成员 | CrystalDecisions.Shared 命名空间
©2005 Business Objects SA 保留所有权利。
| Business Objects SA http://www.china.businessobjects.com/ 支持服务 http://www.china.businessobjects.com/ |