[]
Adds a Field to the collection. This overload adds a legacy field type and is deprecated.
[Obsolete("This method adds a field of the legacy 'do-it-all' Field type, which usually is sub-optimal. In most situations it is better to create a suitable specialized field type (such as TextField) and add it to the Fields collection instead.")]
public Field Add(string name, string text, double left, double top, double width, double height)
Type | Name | Description |
---|---|---|
string | 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. |
string | 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. |
double | left | Left coordinate of the new field, in twips, with respect to its containing section. |
double | top | Top coordinate of the new field, in twips, with respect to its containing section. |
double | width | Width of the new field, in twips. |
double | height | Height of the new field, in twips. |
Type | Description |
---|---|
Field | A reference to the newly added field. |
If you add a field to a section's Fields collection, the new field is automatically assigned to that section.
If you add a field to the control's Fields collection, the new field is not assigned to any sections. In this case, you must set the field's Section property or it will not be rendered in the report.
Adds a Field to the collection.
[Obsolete]
public Field Add(string name, string text, Rect rc)
Type | Name | Description |
---|---|---|
string | 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. |
string | 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. |
Rect | rc | Defines the position of the field, in twips, with respect to its containing section. |
Type | Description |
---|---|
Field | A reference to the newly added field. |
If you add a field to a section's Fields collection, the new field is automatically assigned to that section.
If you add a field to the control's Fields collection, the new field is not assigned to any sections. In this case, you must set the field's Section property or it will not be rendered in the report.
Adds a field or a clone of a field to the collection.
public FieldBase Add(FieldBase field)
Type | Name | Description |
---|---|---|
FieldBase | field | A FieldBase object to add to the collection. |
Type | Description |
---|---|
FieldBase | A reference to the newly added field. |
If the field does not belong to any reports, it is added to the collection. If the field already belongs to a report, a clone is created and added to the collection.