Class CommandParameter
This class represents a single parameter to use in the "select" command.
Implements
Inherited Members
Namespace: FastReport.Data
Assembly: FastReport.Base.dll
Syntax
public class CommandParameter : Base, IFRSerializable
Constructors
CommandParameter()
Initializes a new instance of the CommandParameter class with default settings.
Declaration
public CommandParameter()
Properties
DataType
Gets or sets the parameter's data type.
Declaration
public virtual int DataType { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
DefaultValue
Gets or sets a default value for this parameter.
Declaration
public virtual string DefaultValue { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
This value is used when you designing a report. Also it is used when report is running in case if you don't provide a value for the Expression property.
Direction
Gets or set type of parameter.
Declaration
public virtual ParameterDirection Direction { get; set; }
Property Value
Type | Description |
---|---|
ParameterDirection |
Expression
Gets or sets an expression that returns the parameter's value.
Declaration
public virtual string Expression { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
If this property is not set, the DefaultValue property will be used to obtain a parameter's value.
Restrictions
This property is not relevant to this class.
Declaration
public Restrictions Restrictions { get; set; }
Property Value
Type | Description |
---|---|
Restrictions |
Size
Gets or sets the size of parameter's data.
Declaration
public virtual int Size { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Remarks
This property is used if the DataType property is set to String.
Value
Gets or sets the parameter's value.
Declaration
public object Value { get; set; }
Property Value
Type | Description |
---|---|
System.Object |
Methods
Assign(Base)
Copies the contents of another, similar object.
Declaration
public override void Assign(Base source)
Parameters
Type | Name | Description |
---|---|---|
Base | source | Source object to copy the contents from. |
Overrides
Remarks
Call Assign to copy the properties from another object of the same type. The standard form of a call to Assign is
destination.Assign(source);
which tells the destination object to copy the contents of the source object to itself. In this method, all child objects are ignored. If you want to copy child objects, use the AssignAll method.
See Also
GetExpressions()
Gets all expressions contained in the object.
Declaration
public override string[] GetExpressions()
Returns
Type | Description |
---|---|
System.String[] | Array of expressions or null if object contains no expressions. |
Overrides
Remarks
Do not call this method directly. You may override it if you are developing a new component for FastReport.
This method is called by FastReport each time before run a report. FastReport do this to collect all expressions and compile them. For example, GetExpressions method of the TextObject class parses the text and returns all expressions found in the text.
Serialize(FRWriter)
Serializes the object.
Declaration
public override void Serialize(FRWriter writer)
Parameters
Type | Name | Description |
---|---|---|
FRWriter | writer | Writer object. |
Overrides
Remarks
Do not call this method directly. You should override it if you are developing a new component for FastReport.
This method is called when the object needs to save the state. It may happen when:
- saving the report to the file or stream;
- saving the report to the designer's undo buffer;
- assigning the object to another object using the Assign(Base) or AssignAll methods;
- saving the object to the designer's clipboard;
- saving the object to the preview (when run a report).