ControlParameter Class
Binds the value of a property of a System.Web.UI.Control to a report parameter.
Namespace CrystalDecisions.Web Assembly CrystalDecisions.Web (CrystalDecisions.Web.dll)
Syntax
'Declaration
Public Class ControlParameter
Inherits Parameter
Implements ICloneable
public class ControlParameter : Parameter, ICloneable
Example
This example shows how to initialize a ControlParameter.
'Declaration
Private Function InitializeControlParameter(ByVal myControl As System.Web.UI.Control, _
ByVal myControlParameterName As String, ByVal myPropertyName As String, ByVal myReportName As String)
Dim myControlParameter As ControlParameter = New ControlParameter
myControlParameter.ControlID = myControl.ID
myControlParameter.ConvertEmptyStringToNull = True
myControlParameter.DefaultValue = ""
myControlParameter.Name = myControlParameterName
myControlParameter.PropertyName = myPropertyName
myControlParameter.ReportName = myReportName
InitializeControlParameter = myControlParameter
End Function
private ControlParameter InitializeControlParameter(System.Web.UI.Control control,
String controlParameterName, String propertyName, String reportName)
{
ControlParameter controlParameter = new ControlParameter();
controlParameter.ControlID = control.ID;
controlParameter.ConvertEmptyStringToNull = true;
controlParameter.DefaultValue = null;
controlParameter.Name = controlParameterName;
controlParameter.PropertyName = propertyName;
controlParameter.ReportName = reportName;
return controlParameter;
}
Inheritance Hierarchy
Object
Parameter
ControlParameter
Version Information
Crystal Reports Basic for Visual Studio 2008
Supported since: Crystal Reports for Visual Studio 2005