CrystalReportViewerBase.ParameterFieldInfo 属性
获取或设置参数字段集合对象。
命名空间 CrystalDecisions.Web 程序集 CrystalDecisions.Web (CrystalDecisions.Web.dll)
语法
声明
Public Property ParameterFieldInfo As CrystalDecisions.Shared.ParameterFields
public CrystalDecisions.Shared.ParameterFields ParameterFieldInfo {get; set;}
示例
此示例显示如何为 CrystalReportViewerBase 创建 ParameterFieldInfo 对象。
声明
Private Sub SetParameterFieldInfo(ByVal myFieldName As String, ByVal myFieldValue As String)
Dim myParameterDiscreteValue As ParameterDiscreteValue = New ParameterDiscreteValue
myParameterDiscreteValue.Value = myFieldValue
Dim myParameterValues As ParameterValues = New ParameterValues
myParameterValues.Add(myParameterDiscreteValue)
Dim myParameterField As ParameterField = New ParameterField
myParameterField.Name = myFieldName
myParameterField.CurrentValues = myParameterValues
Dim myPrameterFields As ParameterFields = New ParameterFields
myPrameterFields.Add(myParameterField)
CrystalReportViewerBase.ParameterFieldInfo = myPrameterFields
End Sub
private void SetParameterFieldInfo(String fieldName, String fieldValue)
{
ParameterDiscreteValue parameterDiscreteValue = new ParameterDiscreteValue();
parameterDiscreteValue.Value = fieldValue;
ParameterValues currentParameterValues = new ParameterValues();
currentParameterValues.Add(parameterDiscreteValue);
ParameterField parameterField = new ParameterField();
parameterField.Name = fieldName;
parameterField.CurrentValues = currentParameterValues;
ParameterFields parameterFields = new ParameterFields();
parameterFields.Add(parameterField);
crystalReportViewerBase.ParameterFieldInfo = parameterFields;
}
版本信息
Crystal Reports Basic for Visual Studio 2008
从此版本开始支持: Crystal Reports for Visual Studio .NET 2002
另请参见
引用
CrystalReportViewerBase 类
CrystalReportViewerBase 成员
CrystalDecisions.Web 命名空间