ComponentOne FlexReport for WinForms
Add(String,String,Double,Double,Double,Double) Method

C1.Win.FlexReport.4 Assembly > C1.Win.FlexReport Namespace > FieldCollection Class > Add Method : Add(String,String,Double,Double,Double,Double) Method
Contains the name of the new field. You should use a consistent naming scheme for the fields and avoid using duplicate names for report fields and database fields. Using repeated names is legal but will cause VBScript expressions that use repeated field names to yield unexpected results.
Contains the value for the new field's Text property. This value may be treated as a literal or as a VBScript expression, depending on the setting of the field's Calculated property. By default, Calculated is set to false and the text is rendered as-is.
Left coordinate of the new field, in twips, with respect to its containing section.
Top coordinate of the new field, in twips, with respect to its containing section.
Width of the new field, in twips.
Height of the new field, in twips.
Adds a Field to the collection. This overload adds a legacy field type and is deprecated.
Syntax
'Declaration
 
Public Overloads Function Add( _
   ByVal name As System.String, _
   ByVal text As System.String, _
   ByVal left As System.Double, _
   ByVal top As System.Double, _
   ByVal width As System.Double, _
   ByVal height As System.Double _
) As Field
public Field Add( 
   System.string name,
   System.string text,
   System.double left,
   System.double top,
   System.double width,
   System.double height
)

Parameters

name
Contains the name of the new field. You should use a consistent naming scheme for the fields and avoid using duplicate names for report fields and database fields. Using repeated names is legal but will cause VBScript expressions that use repeated field names to yield unexpected results.
text
Contains the value for the new field's Text property. This value may be treated as a literal or as a VBScript expression, depending on the setting of the field's Calculated property. By default, Calculated is set to false and the text is rendered as-is.
left
Left coordinate of the new field, in twips, with respect to its containing section.
top
Top coordinate of the new field, in twips, with respect to its containing section.
width
Width of the new field, in twips.
height
Height of the new field, in twips.

Return Value

A reference to the newly added field.
Remarks

If you add a field to a section's Section.Fields collection, the new field is automatically assigned to that section.

If you add a field to the control's C1FlexReport.Fields collection, the new field is not assigned to any sections. In this case, you must set the field's Field.Section property or it will not be rendered in the report.

See Also

Reference

FieldCollection Class
FieldCollection Members
Overload List